@vqnguyen1/piece-icemortgage-encompass 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/package.json +14 -0
- package/src/index.d.ts +8 -0
- package/src/index.js +29 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/create-loan.d.ts +12 -0
- package/src/lib/actions/create-loan.js +101 -0
- package/src/lib/actions/create-loan.js.map +1 -0
- package/src/lib/actions/delete-loan.d.ts +8 -0
- package/src/lib/actions/delete-loan.js +43 -0
- package/src/lib/actions/delete-loan.js.map +1 -0
- package/src/lib/actions/manage-field-locks.d.ts +10 -0
- package/src/lib/actions/manage-field-locks.js +62 -0
- package/src/lib/actions/manage-field-locks.js.map +1 -0
- package/src/lib/actions/retrieve-loan.d.ts +8 -0
- package/src/lib/actions/retrieve-loan.js +39 -0
- package/src/lib/actions/retrieve-loan.js.map +1 -0
- package/src/lib/actions/update-loan.d.ts +14 -0
- package/src/lib/actions/update-loan.js +100 -0
- package/src/lib/actions/update-loan.js.map +1 -0
- package/src/lib/common/auth.d.ts +6 -0
- package/src/lib/common/auth.js +31 -0
- package/src/lib/common/auth.js.map +1 -0
- package/src/lib/common/helpers.d.ts +1 -0
- package/src/lib/common/helpers.js +26 -0
- package/src/lib/common/helpers.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# IceMortgage Encompass
|
|
2
|
+
|
|
3
|
+
This is an Activepieces custom piece for integrating with ICE Mortgage Technology's Encompass API (formerly Ellie Mae).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Create Loan**: Create new loans with full loan data or using templates
|
|
8
|
+
- **Retrieve Loan**: Get complete loan information by loan ID
|
|
9
|
+
- **Update Loan**: Update existing loans with support for templates
|
|
10
|
+
- **Delete Loan**: Remove loans from the system
|
|
11
|
+
- **Manage Field Locks**: Add, remove, or replace field locks on loan fields
|
|
12
|
+
|
|
13
|
+
## Authentication
|
|
14
|
+
|
|
15
|
+
This piece uses OAuth2 Client Credentials authentication. You will need:
|
|
16
|
+
|
|
17
|
+
- **API Base URL**: Your Encompass API endpoint (e.g., `https://api.elliemae.com`)
|
|
18
|
+
- **Client ID**: Your OAuth2 client ID
|
|
19
|
+
- **Client Secret**: Your OAuth2 client secret
|
|
20
|
+
- **Instance ID**: Your Encompass instance ID
|
|
21
|
+
|
|
22
|
+
## Actions
|
|
23
|
+
|
|
24
|
+
### Create Loan
|
|
25
|
+
Create a new loan with borrower, property, and other loan details. Supports applying templates during creation.
|
|
26
|
+
|
|
27
|
+
### Retrieve Loan
|
|
28
|
+
Fetch complete loan information using the loan ID.
|
|
29
|
+
|
|
30
|
+
### Update Loan
|
|
31
|
+
Update existing loan fields. Supports applying loan program templates, closing cost templates, or template sets.
|
|
32
|
+
|
|
33
|
+
### Delete Loan
|
|
34
|
+
Permanently delete a loan from Encompass.
|
|
35
|
+
|
|
36
|
+
### Manage Field Locks
|
|
37
|
+
Control field locking on loan fields. Supports three operations:
|
|
38
|
+
- **Add**: Lock additional fields
|
|
39
|
+
- **Remove**: Unlock specific fields
|
|
40
|
+
- **Replace**: Replace all locked fields with a new set
|
|
41
|
+
|
|
42
|
+
## API Documentation
|
|
43
|
+
|
|
44
|
+
Based on Encompass Developer Connect API v3. For more details, refer to the official Encompass API documentation.
|
|
45
|
+
|
|
46
|
+
## Version
|
|
47
|
+
|
|
48
|
+
0.0.1
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vqnguyen1/piece-icemortgage-encompass",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"@activepieces/pieces-framework": "*",
|
|
8
|
+
"@activepieces/pieces-common": "*",
|
|
9
|
+
"@activepieces/shared": "*"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {},
|
|
12
|
+
"types": "./src/index.d.ts",
|
|
13
|
+
"type": "commonjs"
|
|
14
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { icemortgageEncompassAuth } from './lib/common/auth';
|
|
2
|
+
export declare const icemortgageEncompass: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
+
}>>;
|
|
8
|
+
export { icemortgageEncompassAuth };
|
package/src/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.icemortgageEncompassAuth = exports.icemortgageEncompass = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
const shared_1 = require("@activepieces/shared");
|
|
6
|
+
const auth_1 = require("./lib/common/auth");
|
|
7
|
+
Object.defineProperty(exports, "icemortgageEncompassAuth", { enumerable: true, get: function () { return auth_1.icemortgageEncompassAuth; } });
|
|
8
|
+
const create_loan_1 = require("./lib/actions/create-loan");
|
|
9
|
+
const retrieve_loan_1 = require("./lib/actions/retrieve-loan");
|
|
10
|
+
const update_loan_1 = require("./lib/actions/update-loan");
|
|
11
|
+
const delete_loan_1 = require("./lib/actions/delete-loan");
|
|
12
|
+
const manage_field_locks_1 = require("./lib/actions/manage-field-locks");
|
|
13
|
+
exports.icemortgageEncompass = (0, pieces_framework_1.createPiece)({
|
|
14
|
+
displayName: 'IceMortgage Encompass',
|
|
15
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
16
|
+
minimumSupportedRelease: '0.20.0',
|
|
17
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/icemortgage-encompass.png',
|
|
18
|
+
authors: ['vqnguyen1'],
|
|
19
|
+
categories: [shared_1.PieceCategory.BUSINESS_INTELLIGENCE],
|
|
20
|
+
actions: [
|
|
21
|
+
create_loan_1.createLoan,
|
|
22
|
+
retrieve_loan_1.retrieveLoan,
|
|
23
|
+
update_loan_1.updateLoan,
|
|
24
|
+
delete_loan_1.deleteLoan,
|
|
25
|
+
manage_field_locks_1.manageFieldLocks,
|
|
26
|
+
],
|
|
27
|
+
triggers: [],
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/custom/icemortgage-encompass/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA6D;AAC7D,iDAAqD;AACrD,4CAA6D;AAwBpD,yGAxBA,+BAAwB,OAwBA;AAvBjC,2DAAuD;AACvD,+DAA2D;AAC3D,2DAAuD;AACvD,2DAAuD;AACvD,yEAAoE;AAEvD,QAAA,oBAAoB,GAAG,IAAA,8BAAW,EAAC;IAC9C,WAAW,EAAE,uBAAuB;IACpC,IAAI,EAAE,+BAAwB;IAC9B,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,+DAA+D;IACxE,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,UAAU,EAAE,CAAC,sBAAa,CAAC,qBAAqB,CAAC;IACjD,OAAO,EAAE;QACP,wBAAU;QACV,4BAAY;QACZ,wBAAU;QACV,wBAAU;QACV,qCAAgB;KACjB;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const createLoan: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>, {
|
|
7
|
+
loanData: import("@activepieces/pieces-framework").JsonProperty<true>;
|
|
8
|
+
loanFolder: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
view: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
10
|
+
templateType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
|
+
templatePath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLoan = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
const helpers_1 = require("../common/helpers");
|
|
9
|
+
exports.createLoan = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'create_loan',
|
|
11
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
12
|
+
displayName: 'Create Loan',
|
|
13
|
+
description: 'Create a new loan in Encompass',
|
|
14
|
+
props: {
|
|
15
|
+
loanData: pieces_framework_1.Property.Json({
|
|
16
|
+
displayName: 'Loan Data',
|
|
17
|
+
description: 'The complete loan information as JSON object',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
loanFolder: pieces_framework_1.Property.ShortText({
|
|
21
|
+
displayName: 'Loan Folder',
|
|
22
|
+
description: 'The folder where the loan will be created (e.g., "My Pipeline")',
|
|
23
|
+
required: false,
|
|
24
|
+
}),
|
|
25
|
+
view: pieces_framework_1.Property.StaticDropdown({
|
|
26
|
+
displayName: 'View',
|
|
27
|
+
description: 'The view to return in the response',
|
|
28
|
+
required: false,
|
|
29
|
+
options: {
|
|
30
|
+
options: [
|
|
31
|
+
{ label: 'Entity', value: 'entity' },
|
|
32
|
+
{ label: 'ID', value: 'id' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
defaultValue: 'entity',
|
|
36
|
+
}),
|
|
37
|
+
templateType: pieces_framework_1.Property.StaticDropdown({
|
|
38
|
+
displayName: 'Template Type',
|
|
39
|
+
description: 'Type of template to apply when creating the loan',
|
|
40
|
+
required: false,
|
|
41
|
+
options: {
|
|
42
|
+
options: [
|
|
43
|
+
{ label: 'None', value: '' },
|
|
44
|
+
{ label: 'Template Set', value: 'templateSet' },
|
|
45
|
+
{ label: 'Loan Program', value: 'loanProgram' },
|
|
46
|
+
{ label: 'Closing Cost', value: 'closingCost' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
templatePath: pieces_framework_1.Property.ShortText({
|
|
51
|
+
displayName: 'Template Path',
|
|
52
|
+
description: 'Path to the template (e.g., "Public:\\Companywide\\Template Name")',
|
|
53
|
+
required: false,
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
run(context) {
|
|
57
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
var _a;
|
|
59
|
+
const auth = context.auth;
|
|
60
|
+
const baseUrl = auth.baseUrl;
|
|
61
|
+
const { loanData, loanFolder, view, templateType, templatePath } = context.propsValue;
|
|
62
|
+
// Get access token
|
|
63
|
+
const accessToken = yield (0, helpers_1.getAccessToken)(auth);
|
|
64
|
+
// Build query parameters
|
|
65
|
+
const queryParams = new URLSearchParams();
|
|
66
|
+
if (loanFolder)
|
|
67
|
+
queryParams.append('loanFolder', loanFolder);
|
|
68
|
+
if (view)
|
|
69
|
+
queryParams.append('view', view);
|
|
70
|
+
if (templateType)
|
|
71
|
+
queryParams.append('templateType', templateType);
|
|
72
|
+
if (templatePath)
|
|
73
|
+
queryParams.append('templatePath', templatePath);
|
|
74
|
+
const url = `${baseUrl}/encompass/v3/loans${queryParams.toString() ? '?' + queryParams.toString() : ''}`;
|
|
75
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
76
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
77
|
+
url,
|
|
78
|
+
headers: {
|
|
79
|
+
'Content-Type': 'application/json',
|
|
80
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
81
|
+
},
|
|
82
|
+
body: loanData,
|
|
83
|
+
});
|
|
84
|
+
// Extract loan ID from Location header if present
|
|
85
|
+
const locationHeader = (_a = response.headers) === null || _a === void 0 ? void 0 : _a['location'];
|
|
86
|
+
let loanId = null;
|
|
87
|
+
if (locationHeader) {
|
|
88
|
+
const match = locationHeader.match(/\/loans\/([^\/]+)$/);
|
|
89
|
+
if (match) {
|
|
90
|
+
loanId = match[1];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
loanId,
|
|
95
|
+
loanData: response.body,
|
|
96
|
+
statusCode: response.status,
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=create-loan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-loan.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/actions/create-loan.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAAqE;AACrE,yCAA0D;AAC1D,+CAAmD;AAEtC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,+BAAwB;IAC9B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gCAAgC;IAC7C,KAAK,EAAE;QACL,QA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AAoB,CAAC,CAAC;gBACzD,IAAI,KAAK,EAAE,CAAC;oBACV,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACpB,CAAC;YACH,CAAC;YAED,OAAO;gBACL,MAAM;gBACN,QAAQ,EAAE,QAAQ,CAAC,IAAI;gBACvB,UAAU,EAAE,QAAQ,CAAC,MAAM;aAC5B,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const deleteLoan: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>, {
|
|
7
|
+
loanId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteLoan = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
const helpers_1 = require("../common/helpers");
|
|
9
|
+
exports.deleteLoan = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'delete_loan',
|
|
11
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
12
|
+
displayName: 'Delete Loan',
|
|
13
|
+
description: 'Delete a loan from Encompass',
|
|
14
|
+
props: {
|
|
15
|
+
loanId: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Loan ID',
|
|
17
|
+
description: 'The ID of the loan to delete',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const auth = context.auth;
|
|
24
|
+
const baseUrl = auth.baseUrl;
|
|
25
|
+
const { loanId } = context.propsValue;
|
|
26
|
+
const accessToken = yield (0, helpers_1.getAccessToken)(auth);
|
|
27
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
28
|
+
method: pieces_common_1.HttpMethod.DELETE,
|
|
29
|
+
url: `${baseUrl}/encompass/v3/loans/${loanId}`,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
success: true,
|
|
37
|
+
statusCode: response.status,
|
|
38
|
+
message: `Loan ${loanId} deleted successfully`,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=delete-loan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-loan.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/actions/delete-loan.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAAqE;AACrE,yCAA0D;AAC1D,+CAAmD;AAEtC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,+BAAwB;IAC9B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,8BAA8B;IAC3C,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,IAAW,CAAC;YACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEtC,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,GAAG,OAAO,uBAAuB,MAAM,EAAE;gBAC9C,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,eAAe,EAAE,UAAU,WAAW,EAAE;iBACzC;aACF,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,UAAU,EAAE,QAAQ,CAAC,MAAM;gBAC3B,OAAO,EAAE,QAAQ,MAAM,uBAAuB;aAC/C,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const manageFieldLocks: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>, {
|
|
7
|
+
loanId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
action: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
9
|
+
fields: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.manageFieldLocks = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
const helpers_1 = require("../common/helpers");
|
|
9
|
+
exports.manageFieldLocks = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'manage_field_locks',
|
|
11
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
12
|
+
displayName: 'Manage Field Locks',
|
|
13
|
+
description: 'Add, remove, or replace field locks on a loan',
|
|
14
|
+
props: {
|
|
15
|
+
loanId: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Loan ID',
|
|
17
|
+
description: 'The ID of the loan to manage field locks for',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
action: pieces_framework_1.Property.StaticDropdown({
|
|
21
|
+
displayName: 'Action',
|
|
22
|
+
description: 'The action to perform on field locks',
|
|
23
|
+
required: true,
|
|
24
|
+
options: {
|
|
25
|
+
options: [
|
|
26
|
+
{ label: 'Add', value: 'add' },
|
|
27
|
+
{ label: 'Remove', value: 'remove' },
|
|
28
|
+
{ label: 'Replace', value: 'replace' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
fields: pieces_framework_1.Property.Array({
|
|
33
|
+
displayName: 'Fields',
|
|
34
|
+
description: 'Array of field names to lock/unlock (e.g., ["loan.secondSubordinateAmount", "loan.BorrowerPaidFHAVAClosingCostsAmount"])',
|
|
35
|
+
required: true,
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
run(context) {
|
|
39
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
const auth = context.auth;
|
|
41
|
+
const baseUrl = auth.baseUrl;
|
|
42
|
+
const { loanId, action, fields } = context.propsValue;
|
|
43
|
+
const accessToken = yield (0, helpers_1.getAccessToken)(auth);
|
|
44
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
45
|
+
method: pieces_common_1.HttpMethod.PATCH,
|
|
46
|
+
url: `${baseUrl}/encompass/v3/loans/${loanId}/fieldLockData?action=${action}`,
|
|
47
|
+
headers: {
|
|
48
|
+
'Content-Type': 'application/json',
|
|
49
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
50
|
+
},
|
|
51
|
+
body: fields,
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
success: true,
|
|
55
|
+
action,
|
|
56
|
+
fields,
|
|
57
|
+
statusCode: response.status,
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=manage-field-locks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage-field-locks.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/actions/manage-field-locks.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAAqE;AACrE,yCAA0D;AAC1D,+CAAmD;AAEtC,QAAA,gBAAgB,GAAG,IAAA,+BAAY,EAAC;IAC3C,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,+BAAwB;IAC9B,WAAW,EAAE,oBAAoB;IACjC,WAAW,EAAE,+CAA+C;IAC5D,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aACF;SACF,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,0HAA0H;YACvI,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,IAAW,CAAC;YACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC7B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEtD,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,KAAK;gBACxB,GAAG,EAAE,GAAG,OAAO,uBAAuB,MAAM,yBAAyB,MAAM,EAAE;gBAC7E,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,eAAe,EAAE,UAAU,WAAW,EAAE;iBACzC;gBACD,IAAI,EAAE,MAAM;aACb,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM;gBACN,MAAM;gBACN,UAAU,EAAE,QAAQ,CAAC,MAAM;aAC5B,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const retrieveLoan: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>, {
|
|
7
|
+
loanId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retrieveLoan = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
const helpers_1 = require("../common/helpers");
|
|
9
|
+
exports.retrieveLoan = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'retrieve_loan',
|
|
11
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
12
|
+
displayName: 'Retrieve Loan',
|
|
13
|
+
description: 'Get loan details from Encompass by loan ID',
|
|
14
|
+
props: {
|
|
15
|
+
loanId: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Loan ID',
|
|
17
|
+
description: 'The ID of the loan to retrieve',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
run(context) {
|
|
22
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const auth = context.auth;
|
|
24
|
+
const baseUrl = auth.baseUrl;
|
|
25
|
+
const { loanId } = context.propsValue;
|
|
26
|
+
const accessToken = yield (0, helpers_1.getAccessToken)(auth);
|
|
27
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
28
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
29
|
+
url: `${baseUrl}/encompass/v3/loans/${loanId}`,
|
|
30
|
+
headers: {
|
|
31
|
+
'Content-Type': 'application/json',
|
|
32
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
return response.body;
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=retrieve-loan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-loan.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/actions/retrieve-loan.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAAqE;AACrE,yCAA0D;AAC1D,+CAAmD;AAEtC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,+BAAwB;IAC9B,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,4CAA4C;IACzD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAG,OAAO,CAAC,IAAW,CAAC;YACjC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEtC,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;YAE/C,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,GAAG,OAAO,uBAAuB,MAAM,EAAE;gBAC9C,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,eAAe,EAAE,UAAU,WAAW,EAAE;iBACzC;aACF,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const updateLoan: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>, {
|
|
7
|
+
loanId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
loanData: import("@activepieces/pieces-framework").JsonProperty<true>;
|
|
9
|
+
view: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
10
|
+
templateType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
11
|
+
templatePath: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
+
ignoreEmptyClosingCostValues: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
13
|
+
ignoreEmptyLoanProgramValues: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateLoan = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
const auth_1 = require("../common/auth");
|
|
8
|
+
const helpers_1 = require("../common/helpers");
|
|
9
|
+
exports.updateLoan = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'update_loan',
|
|
11
|
+
auth: auth_1.icemortgageEncompassAuth,
|
|
12
|
+
displayName: 'Update Loan',
|
|
13
|
+
description: 'Update an existing loan in Encompass',
|
|
14
|
+
props: {
|
|
15
|
+
loanId: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Loan ID',
|
|
17
|
+
description: 'The ID of the loan to update',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
loanData: pieces_framework_1.Property.Json({
|
|
21
|
+
displayName: 'Loan Data',
|
|
22
|
+
description: 'The loan fields to update as JSON object',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
view: pieces_framework_1.Property.StaticDropdown({
|
|
26
|
+
displayName: 'View',
|
|
27
|
+
description: 'The view to return in the response',
|
|
28
|
+
required: false,
|
|
29
|
+
options: {
|
|
30
|
+
options: [
|
|
31
|
+
{ label: 'Entity', value: 'entity' },
|
|
32
|
+
{ label: 'ID', value: 'id' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
defaultValue: 'entity',
|
|
36
|
+
}),
|
|
37
|
+
templateType: pieces_framework_1.Property.StaticDropdown({
|
|
38
|
+
displayName: 'Template Type',
|
|
39
|
+
description: 'Type of template to apply when updating the loan',
|
|
40
|
+
required: false,
|
|
41
|
+
options: {
|
|
42
|
+
options: [
|
|
43
|
+
{ label: 'None', value: '' },
|
|
44
|
+
{ label: 'Template Set', value: 'templateSet' },
|
|
45
|
+
{ label: 'Loan Program', value: 'loanProgram' },
|
|
46
|
+
{ label: 'Closing Cost', value: 'closingCost' },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
templatePath: pieces_framework_1.Property.ShortText({
|
|
51
|
+
displayName: 'Template Path',
|
|
52
|
+
description: 'Path to the template (e.g., "Public:\\Companywide\\Template Name")',
|
|
53
|
+
required: false,
|
|
54
|
+
}),
|
|
55
|
+
ignoreEmptyClosingCostValues: pieces_framework_1.Property.Checkbox({
|
|
56
|
+
displayName: 'Ignore Empty Closing Cost Values',
|
|
57
|
+
description: 'Whether to ignore empty closing cost values when applying templates',
|
|
58
|
+
required: false,
|
|
59
|
+
defaultValue: false,
|
|
60
|
+
}),
|
|
61
|
+
ignoreEmptyLoanProgramValues: pieces_framework_1.Property.Checkbox({
|
|
62
|
+
displayName: 'Ignore Empty Loan Program Values',
|
|
63
|
+
description: 'Whether to ignore empty loan program values when applying templates',
|
|
64
|
+
required: false,
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
}),
|
|
67
|
+
},
|
|
68
|
+
run(context) {
|
|
69
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const auth = context.auth;
|
|
71
|
+
const baseUrl = auth.baseUrl;
|
|
72
|
+
const { loanId, loanData, view, templateType, templatePath, ignoreEmptyClosingCostValues, ignoreEmptyLoanProgramValues, } = context.propsValue;
|
|
73
|
+
const accessToken = yield (0, helpers_1.getAccessToken)(auth);
|
|
74
|
+
// Build query parameters
|
|
75
|
+
const queryParams = new URLSearchParams();
|
|
76
|
+
if (view)
|
|
77
|
+
queryParams.append('view', view);
|
|
78
|
+
if (templateType)
|
|
79
|
+
queryParams.append('templateType', templateType);
|
|
80
|
+
if (templatePath)
|
|
81
|
+
queryParams.append('templatePath', templatePath);
|
|
82
|
+
if (ignoreEmptyClosingCostValues)
|
|
83
|
+
queryParams.append('ignoreEmptyClosingCostValues', 'true');
|
|
84
|
+
if (ignoreEmptyLoanProgramValues)
|
|
85
|
+
queryParams.append('ignoreEmptyLoanProgramValues', 'true');
|
|
86
|
+
const url = `${baseUrl}/encompass/v3/loans/${loanId}${queryParams.toString() ? '?' + queryParams.toString() : ''}`;
|
|
87
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
88
|
+
method: pieces_common_1.HttpMethod.PATCH,
|
|
89
|
+
url,
|
|
90
|
+
headers: {
|
|
91
|
+
'Content-Type': 'application/json',
|
|
92
|
+
'Authorization': `Bearer ${accessToken}`,
|
|
93
|
+
},
|
|
94
|
+
body: loanData,
|
|
95
|
+
});
|
|
96
|
+
return response.body;
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=update-loan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-loan.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/actions/update-loan.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,+DAAqE;AACrE,yCAA0D;AAC1D,+CAAmD;AAEtC,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,+BAAwB;IAC9B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,sCAAsC;IACnD,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,IAAI,CAAC;YACtB,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC5B,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;iBAC7B;aACF;YACD,YAAY,EAAE,QAAQ;SACvB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACpC,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;oBAC5B,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE;oBAC/C,EAAE,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E,IAAI,4BAA4B;gBAAE,WAAW,CAAC,MAAM,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;YAC7F,IAAI,4BAA4B;gBAAE,WAAW,CAAC,MAAM,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC;YAE7F,MAAM,GAAG,GAAG,GAAG,OAAO,uBAAuB,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;YAEnH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,KAAK;gBACxB,GAAG;gBACH,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,eAAe,EAAE,UAAU,WAAW,EAAE;iBACzC;gBACD,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const icemortgageEncompassAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
baseUrl: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
clientId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
+
clientSecret: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
instanceId: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.icemortgageEncompassAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
exports.icemortgageEncompassAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
6
|
+
description: 'ICE Mortgage Technology Encompass API credentials',
|
|
7
|
+
required: true,
|
|
8
|
+
props: {
|
|
9
|
+
baseUrl: pieces_framework_1.Property.ShortText({
|
|
10
|
+
displayName: 'API Base URL',
|
|
11
|
+
description: 'The base URL for the Encompass API (e.g., https://api.elliemae.com)',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
clientId: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Client ID',
|
|
16
|
+
description: 'Your Encompass API Client ID',
|
|
17
|
+
required: true,
|
|
18
|
+
}),
|
|
19
|
+
clientSecret: pieces_framework_1.Property.ShortText({
|
|
20
|
+
displayName: 'Client Secret',
|
|
21
|
+
description: 'Your Encompass API Client Secret',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
instanceId: pieces_framework_1.Property.ShortText({
|
|
25
|
+
displayName: 'Instance ID',
|
|
26
|
+
description: 'Your Encompass Instance ID',
|
|
27
|
+
required: true,
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AAExD,QAAA,wBAAwB,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC3D,WAAW,EAAE,mDAAmD;IAChE,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,qEAAqE;YAClF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,4BAA4B;YACzC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAccessToken(auth: any): Promise<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccessToken = getAccessToken;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
+
// Helper function to get access token
|
|
7
|
+
function getAccessToken(auth) {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
// This is a simplified version. In production, implement proper token caching
|
|
10
|
+
const tokenResponse = yield pieces_common_1.httpClient.sendRequest({
|
|
11
|
+
method: pieces_common_1.HttpMethod.POST,
|
|
12
|
+
url: `${auth.baseUrl}/oauth2/v1/token`,
|
|
13
|
+
headers: {
|
|
14
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
15
|
+
},
|
|
16
|
+
body: new URLSearchParams({
|
|
17
|
+
grant_type: 'client_credentials',
|
|
18
|
+
client_id: auth.clientId,
|
|
19
|
+
client_secret: auth.clientSecret,
|
|
20
|
+
instance_id: auth.instanceId,
|
|
21
|
+
}).toString(),
|
|
22
|
+
});
|
|
23
|
+
return tokenResponse.body.access_token;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/custom/icemortgage-encompass/src/lib/common/helpers.ts"],"names":[],"mappings":";;AAGA,wCAiBC;;AApBD,+DAAqE;AAErE,sCAAsC;AACtC,SAAsB,cAAc,CAAC,IAAS;;QAC5C,8EAA8E;QAC9E,MAAM,aAAa,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;YACjD,MAAM,EAAE,0BAAU,CAAC,IAAI;YACvB,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,kBAAkB;YACtC,OAAO,EAAE;gBACP,cAAc,EAAE,mCAAmC;aACpD;YACD,IAAI,EAAE,IAAI,eAAe,CAAC;gBACxB,UAAU,EAAE,oBAAoB;gBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;gBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;gBAChC,WAAW,EAAE,IAAI,CAAC,UAAU;aAC7B,CAAC,CAAC,QAAQ,EAAE;SACd,CAAC,CAAC;QAEH,OAAQ,aAAa,CAAC,IAAY,CAAC,YAAY,CAAC;IAClD,CAAC;CAAA"}
|