@vqnguyen1/piece-narmi 0.0.1 → 0.0.6
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 +117 -0
- package/package.json +6 -1
- package/src/index.js +16 -1
- package/src/index.js.map +1 -1
- package/vqnguyen1-piece-narmi-0.0.1.tgz +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Narmi Account Opening API
|
|
2
|
+
|
|
3
|
+
This piece integrates with the Narmi Account Opening API to manage account applications.
|
|
4
|
+
|
|
5
|
+
## Authentication
|
|
6
|
+
|
|
7
|
+
The Narmi piece uses custom authentication with the following properties:
|
|
8
|
+
|
|
9
|
+
- **Base URL**: The base URL for the Narmi API (e.g., `https://api.sandbox.narmi.dev`)
|
|
10
|
+
- **API Key**: Your Narmi API Key (OAuth2 token) - Optional, only required for certain endpoints
|
|
11
|
+
|
|
12
|
+
## Available Actions
|
|
13
|
+
|
|
14
|
+
### Get CSRF Token
|
|
15
|
+
Get a CSRF token for making authenticated requests to the Narmi API.
|
|
16
|
+
|
|
17
|
+
**Inputs:**
|
|
18
|
+
- Has Applicant Token (optional): Whether you have an applicant_token cookie
|
|
19
|
+
|
|
20
|
+
**Returns:** CSRF token and response body
|
|
21
|
+
|
|
22
|
+
### Get Products
|
|
23
|
+
Get the list of available Account Opening products.
|
|
24
|
+
|
|
25
|
+
**Returns:** List of products with details like category, name, description, minimum balance, etc.
|
|
26
|
+
|
|
27
|
+
### Create Account Application
|
|
28
|
+
Create a new account application.
|
|
29
|
+
|
|
30
|
+
**Inputs:**
|
|
31
|
+
- CSRF Token (required)
|
|
32
|
+
- Email (required)
|
|
33
|
+
- First Name (optional)
|
|
34
|
+
- Last Name (optional)
|
|
35
|
+
- Phone (optional)
|
|
36
|
+
- Selected Products (optional): Array of product IDs
|
|
37
|
+
- Additional Data (optional): Additional application data as JSON
|
|
38
|
+
|
|
39
|
+
**Returns:** Created application with token
|
|
40
|
+
|
|
41
|
+
### Get Account Application
|
|
42
|
+
Retrieve an account application by UUID.
|
|
43
|
+
|
|
44
|
+
**Inputs:**
|
|
45
|
+
- Application UUID (required)
|
|
46
|
+
- CSRF Token (optional)
|
|
47
|
+
|
|
48
|
+
**Returns:** Application details
|
|
49
|
+
|
|
50
|
+
### Update Account Application
|
|
51
|
+
Update an existing account application.
|
|
52
|
+
|
|
53
|
+
**Inputs:**
|
|
54
|
+
- Application UUID (required)
|
|
55
|
+
- CSRF Token (required)
|
|
56
|
+
- Update Data (required): JSON object with fields to update
|
|
57
|
+
|
|
58
|
+
**Returns:** Updated application details
|
|
59
|
+
|
|
60
|
+
### Submit Application
|
|
61
|
+
Submit an account application for processing.
|
|
62
|
+
|
|
63
|
+
**Inputs:**
|
|
64
|
+
- Application UUID (required)
|
|
65
|
+
- CSRF Token (required)
|
|
66
|
+
- Selected Products (required): Array of product objects
|
|
67
|
+
- Device ID (optional)
|
|
68
|
+
- UTM Source (optional)
|
|
69
|
+
|
|
70
|
+
**Returns:** Submission response with application state
|
|
71
|
+
|
|
72
|
+
### Run KYC
|
|
73
|
+
Initiate KYC (Know Your Customer) execution for an account application.
|
|
74
|
+
|
|
75
|
+
**Inputs:**
|
|
76
|
+
- Application UUID (required)
|
|
77
|
+
- CSRF Token (optional)
|
|
78
|
+
|
|
79
|
+
**Returns:** KYC execution response
|
|
80
|
+
|
|
81
|
+
### Custom API Call
|
|
82
|
+
Make a custom API call to any Narmi endpoint.
|
|
83
|
+
|
|
84
|
+
**Inputs:**
|
|
85
|
+
- URL (required): Full URL or relative path to the base URL (e.g., `/v1/account_opening/`)
|
|
86
|
+
- Method (required): HTTP method (GET, POST, PUT, DELETE, PATCH)
|
|
87
|
+
- Headers (optional): Custom headers to include
|
|
88
|
+
- Query Parameters (optional): URL query parameters
|
|
89
|
+
- Body (optional): Request body as JSON
|
|
90
|
+
- Response is Binary (optional): Enable for file responses like PDFs
|
|
91
|
+
- No Error on Failure (optional): Return error message instead of throwing
|
|
92
|
+
- Timeout (optional): Request timeout in seconds
|
|
93
|
+
|
|
94
|
+
**Returns:** API response
|
|
95
|
+
|
|
96
|
+
**Note:** Authorization headers are automatically injected if an API key is configured.
|
|
97
|
+
|
|
98
|
+
## Usage Example
|
|
99
|
+
|
|
100
|
+
1. First, get a CSRF token using the "Get CSRF Token" action
|
|
101
|
+
2. Create a new account application using the CSRF token
|
|
102
|
+
3. Update the application with applicant information
|
|
103
|
+
4. Submit the application for processing
|
|
104
|
+
5. Optionally run KYC verification
|
|
105
|
+
|
|
106
|
+
## API Documentation
|
|
107
|
+
|
|
108
|
+
For more information about the Narmi Account Opening API, visit:
|
|
109
|
+
https://narmi.stoplight.io/docs/narmi-developer-docs/
|
|
110
|
+
|
|
111
|
+
## Version
|
|
112
|
+
|
|
113
|
+
Current version: 0.0.2
|
|
114
|
+
|
|
115
|
+
## Author
|
|
116
|
+
|
|
117
|
+
vqnguyen1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vqnguyen1/piece-narmi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./src/index.js"
|
|
10
10
|
},
|
|
11
|
+
"tags": [
|
|
12
|
+
"narmi",
|
|
13
|
+
"banking",
|
|
14
|
+
"account-opening"
|
|
15
|
+
],
|
|
11
16
|
"dependencies": {
|
|
12
17
|
"tslib": "^2.3.0"
|
|
13
18
|
},
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.narmi = exports.narmiAuth = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
6
|
const shared_1 = require("@activepieces/shared");
|
|
7
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
8
|
const create_account_application_1 = require("./lib/actions/create-account-application");
|
|
7
9
|
const get_account_application_1 = require("./lib/actions/get-account-application");
|
|
8
10
|
const update_account_application_1 = require("./lib/actions/update-account-application");
|
|
@@ -31,7 +33,7 @@ exports.narmi = (0, pieces_framework_1.createPiece)({
|
|
|
31
33
|
displayName: 'Narmi',
|
|
32
34
|
auth: exports.narmiAuth,
|
|
33
35
|
minimumSupportedRelease: '0.20.0',
|
|
34
|
-
logoUrl: 'https://
|
|
36
|
+
logoUrl: 'https://cdn.prod.website-files.com/6155dc277c0e691a95412e1f/69679d62d5080aa68d936d0c_Narmi%20Guard_Thumbnail.jpg',
|
|
35
37
|
authors: ['vqnguyen1'],
|
|
36
38
|
categories: [shared_1.PieceCategory.BUSINESS_INTELLIGENCE],
|
|
37
39
|
actions: [
|
|
@@ -42,6 +44,19 @@ exports.narmi = (0, pieces_framework_1.createPiece)({
|
|
|
42
44
|
submit_application_1.submitApplication,
|
|
43
45
|
run_kyc_1.runKyc,
|
|
44
46
|
get_products_1.getProducts,
|
|
47
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
48
|
+
baseUrl: (auth) => auth.baseUrl || 'https://api.sandbox.narmi.dev',
|
|
49
|
+
auth: exports.narmiAuth,
|
|
50
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
+
const apiKey = auth.apiKey;
|
|
52
|
+
if (apiKey) {
|
|
53
|
+
return {
|
|
54
|
+
Authorization: `Bearer ${apiKey}`,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {};
|
|
58
|
+
}),
|
|
59
|
+
}),
|
|
45
60
|
],
|
|
46
61
|
triggers: [],
|
|
47
62
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/custom/narmi/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/custom/narmi/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAkF;AAClF,iDAAqD;AACrD,+DAAwE;AACxE,yFAAoF;AACpF,mFAA8E;AAC9E,yFAAoF;AACpF,yEAAqE;AACrE,mDAA+C;AAC/C,6DAAyD;AACzD,iEAA4D;AAE/C,QAAA,SAAS,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC5C,WAAW,EAAE,uCAAuC;IACpD,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,sEAAsE;YACnF,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,+BAA+B;SAC9C,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;CACF,CAAC,CAAC;AAEU,QAAA,KAAK,GAAG,IAAA,8BAAW,EAAC;IAC/B,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,iBAAS;IACf,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,kHAAkH;IAC3H,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,UAAU,EAAE,CAAC,sBAAa,CAAC,qBAAqB,CAAC;IACjD,OAAO,EAAE;QACP,6BAAY;QACZ,qDAAwB;QACxB,+CAAqB;QACrB,qDAAwB;QACxB,sCAAiB;QACjB,gBAAM;QACN,0BAAW;QACX,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAE,IAAY,CAAC,OAAO,IAAI,+BAA+B;YAC3E,IAAI,EAAE,iBAAS;YACf,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,MAAM,MAAM,GAAI,IAAY,CAAC,MAAM,CAAC;gBACpC,IAAI,MAAM,EAAE,CAAC;oBACX,OAAO;wBACL,aAAa,EAAE,UAAU,MAAM,EAAE;qBAClC,CAAC;gBACJ,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
Binary file
|