@vqnguyen1/piece-icemortgage-encompass 0.0.1 → 0.0.2

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.
@@ -0,0 +1,160 @@
1
+ # IceMortgage Encompass Piece - Implementation Summary
2
+
3
+ ## Overview
4
+ Successfully created an Activepieces custom piece for **IceMortgage Encompass** (formerly Ellie Mae) following the guidelines in `BUILDING_CUSTOM_PIECES.md`.
5
+
6
+ ## Piece Name
7
+ **IceMortgage Encompass**
8
+
9
+ ## Package Details
10
+ - **Package Name**: `@vqnguyen1/piece-icemortgage-encompass`
11
+ - **Version**: 0.0.1
12
+ - **License**: MIT
13
+ - **Author**: vqnguyen1
14
+
15
+ ## Structure Created
16
+
17
+ ```
18
+ packages/pieces/custom/icemortgage-encompass/
19
+ ├── package.json # With correct peerDependencies (*)
20
+ ├── project.json # Nx build configuration
21
+ ├── tsconfig.json # TypeScript config
22
+ ├── tsconfig.lib.json # Library-specific TS config
23
+ ├── README.md # Documentation
24
+ └── src/
25
+ ├── index.ts # Main piece export
26
+ └── lib/
27
+ ├── common/
28
+ │ ├── auth.ts # Authentication configuration
29
+ │ └── helpers.ts # OAuth2 token helper
30
+ └── actions/
31
+ ├── create-loan.ts # Create Loan action
32
+ ├── retrieve-loan.ts # Retrieve Loan action
33
+ ├── update-loan.ts # Update Loan action
34
+ ├── delete-loan.ts # Delete Loan action
35
+ └── manage-field-locks.ts # Manage Field Locks action
36
+ ```
37
+
38
+ ## Authentication
39
+ Uses **OAuth2 Client Credentials** flow with the following properties:
40
+ - Base URL
41
+ - Client ID
42
+ - Client Secret
43
+ - Instance ID
44
+
45
+ ## Actions Implemented
46
+
47
+ ### 1. Create Loan
48
+ - Create new loans with full data or using templates
49
+ - Supports template types: templateSet, loanProgram, closingCost
50
+ - Returns loan ID and full loan data
51
+
52
+ ### 2. Retrieve Loan
53
+ - Get complete loan information by loan ID
54
+ - Simple GET operation
55
+
56
+ ### 3. Update Loan
57
+ - Update existing loan fields
58
+ - Supports applying templates during update
59
+ - Configurable template options
60
+
61
+ ### 4. Delete Loan
62
+ - Permanently remove a loan
63
+ - Returns success confirmation
64
+
65
+ ### 5. Manage Field Locks
66
+ - **Add**: Lock additional fields
67
+ - **Remove**: Unlock specific fields
68
+ - **Replace**: Replace all locked fields
69
+ - Separate PATCH operations as requested
70
+
71
+ ## API Endpoints Covered
72
+
73
+ Based on the Postman collection analysis:
74
+
75
+ ✅ **CREATE Operations**
76
+ - POST `/encompass/v3/loans` (standard, with template set, TPO)
77
+
78
+ ✅ **RETRIEVE Operations**
79
+ - GET `/encompass/v3/loans/{loanId}`
80
+
81
+ ✅ **UPDATE Operations**
82
+ - PATCH `/encompass/v3/loans/{loanId}` (standard)
83
+ - PATCH `/encompass/v3/loans/{loanId}/urlaVersion`
84
+ - PATCH with templates (templateSet, loanProgram, closingCost)
85
+
86
+ ✅ **DELETE Operations**
87
+ - DELETE `/encompass/v3/loans/{loanId}`
88
+
89
+ ✅ **FIELD LOCK Operations** (Kept Separate)
90
+ - PATCH `/encompass/v3/loans/{loanId}/fieldLockData?action=add`
91
+ - PATCH `/encompass/v3/loans/{loanId}/fieldLockData?action=remove`
92
+ - PATCH `/encompass/v3/loans/{loanId}/fieldLockData?action=replace`
93
+
94
+ ## Build Status
95
+ ✅ **Successfully Built** with Nx
96
+
97
+ Build output location:
98
+ ```
99
+ dist/packages/pieces/custom/icemortgage-encompass/
100
+ ```
101
+
102
+ Compiled files include:
103
+ - JavaScript files (.js)
104
+ - Type definitions (.d.ts)
105
+ - Source maps (.js.map)
106
+ - Transformed package.json
107
+ - README.md
108
+
109
+ ## Compliance with BUILDING_CUSTOM_PIECES.md
110
+
111
+ ✅ Used `peerDependencies` with wildcard `"*"` versions
112
+ ✅ Imported `httpClient` from `@activepieces/pieces-common`
113
+ ✅ No file extensions in relative imports
114
+ ✅ Cast `context.auth` to `any` for property access
115
+ ✅ Source package.json points to TypeScript files
116
+ ✅ Built package.json correctly transformed to point to `.js` files
117
+ ✅ Added proper `type: "commonjs"` to package.json
118
+ ✅ Added `types` field to package.json
119
+
120
+ ## Next Steps
121
+
122
+ To publish this piece:
123
+
124
+ ```bash
125
+ # Navigate to built output
126
+ cd dist/packages/pieces/custom/icemortgage-encompass
127
+
128
+ # Verify the build
129
+ ls -la src/ # Should see .js, .d.ts, .js.map files
130
+
131
+ # Create tarball (optional)
132
+ npm pack
133
+
134
+ # Publish to npm
135
+ npm publish --access public
136
+ ```
137
+
138
+ To install in Activepieces:
139
+
140
+ ```bash
141
+ curl -X POST http://localhost/api/v1/pieces \
142
+ -H "Content-Type: application/json" \
143
+ -d '{
144
+ "packageType": "REGISTRY",
145
+ "pieceName": "@vqnguyen1/piece-icemortgage-encompass",
146
+ "pieceVersion": "0.0.1"
147
+ }'
148
+ ```
149
+
150
+ ## API Reference Document
151
+ Created comprehensive API reference at:
152
+ `tmp/packages/shared/Encompass_V3_Manage_Loan_API_Consolidated.md`
153
+
154
+ This document consolidates all API calls from the Postman collection with:
155
+ - Request methods
156
+ - Endpoints
157
+ - Query parameters
158
+ - Headers
159
+ - Request bodies
160
+ - Response details
package/logo.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vqnguyen1/piece-icemortgage-encompass",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "license": "MIT",
5
5
  "main": "./src/index.js",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -14,7 +14,7 @@ exports.icemortgageEncompass = (0, pieces_framework_1.createPiece)({
14
14
  displayName: 'IceMortgage Encompass',
15
15
  auth: auth_1.icemortgageEncompassAuth,
16
16
  minimumSupportedRelease: '0.20.0',
17
- logoUrl: 'https://cdn.activepieces.com/pieces/icemortgage-encompass.png',
17
+ logoUrl: 'logo.png',
18
18
  authors: ['vqnguyen1'],
19
19
  categories: [shared_1.PieceCategory.BUSINESS_INTELLIGENCE],
20
20
  actions: [
package/src/index.js.map CHANGED
@@ -1 +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"}
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,UAAU;IACnB,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"}