├── .github
└── workflows
│ ├── node.js.yml
│ └── npm-publish.yml
├── .gitignore
├── CONTRIBUTORS.md
├── README.md
├── docs
├── Client.html
├── bankstatements_deleteBankStatement.js.html
├── bankstatements_getBankStatement.js.html
├── bankstatements_getBankStatements.js.html
├── bankstatements_processBankStatement.js.html
├── bankstatements_processBankStatementBase64.js.html
├── bankstatements_processBankStatementStream.js.html
├── bankstatements_processBankStatementUrl.js.html
├── businesscards_deleteBusinessCard.js.html
├── businesscards_getBusinessCard.js.html
├── businesscards_getBusinessCards.js.html
├── businesscards_processBusinessCard.js.html
├── businesscards_processBusinessCardBase64.js.html
├── businesscards_processBusinessCardStream.js.html
├── businesscards_processBusinessCardUrl.js.html
├── checks_deleteCheck.js.html
├── checks_getCheck.js.html
├── checks_getChecks.js.html
├── checks_processCheck.js.html
├── checks_processCheckBase64.js.html
├── checks_processCheckStream.js.html
├── checks_processCheckUrl.js.html
├── client_constructor.js.html
├── documents_deleteDocument.js.html
├── documents_getDocument.js.html
├── documents_getDocuments.js.html
├── documents_processDocument.js.html
├── documents_processDocumentBase64.js.html
├── documents_processDocumentStream.js.html
├── documents_processDocumentUrl.js.html
├── documents_tags_addTag.js.html
├── documents_tags_addTags.js.html
├── documents_tags_deleteTags.js.html
├── documents_tags_replaceTags.js.html
├── documents_updateDocument.js.html
├── fonts
│ ├── OpenSans-Bold-webfont.eot
│ ├── OpenSans-Bold-webfont.svg
│ ├── OpenSans-Bold-webfont.woff
│ ├── OpenSans-BoldItalic-webfont.eot
│ ├── OpenSans-BoldItalic-webfont.svg
│ ├── OpenSans-BoldItalic-webfont.woff
│ ├── OpenSans-Italic-webfont.eot
│ ├── OpenSans-Italic-webfont.svg
│ ├── OpenSans-Italic-webfont.woff
│ ├── OpenSans-Light-webfont.eot
│ ├── OpenSans-Light-webfont.svg
│ ├── OpenSans-Light-webfont.woff
│ ├── OpenSans-LightItalic-webfont.eot
│ ├── OpenSans-LightItalic-webfont.svg
│ ├── OpenSans-LightItalic-webfont.woff
│ ├── OpenSans-Regular-webfont.eot
│ ├── OpenSans-Regular-webfont.svg
│ ├── OpenSans-Regular-webfont.woff
│ ├── OpenSans-Semibold-webfont.eot
│ ├── OpenSans-Semibold-webfont.svg
│ ├── OpenSans-Semibold-webfont.ttf
│ ├── OpenSans-Semibold-webfont.woff
│ ├── OpenSans-SemiboldItalic-webfont.eot
│ ├── OpenSans-SemiboldItalic-webfont.svg
│ ├── OpenSans-SemiboldItalic-webfont.ttf
│ └── OpenSans-SemiboldItalic-webfont.woff
├── index.html
├── scripts
│ ├── linenumber.js
│ └── prettify
│ │ ├── Apache-License-2.0.txt
│ │ ├── lang-css.js
│ │ └── prettify.js
├── styles
│ ├── jsdoc-default.css
│ ├── prettify-jsdoc.css
│ └── prettify-tomorrow.css
├── w2s_deleteW2.js.html
├── w2s_getW2.js.html
├── w2s_getW2s.js.html
├── w2s_processW2.js.html
├── w2s_processW2Base64.js.html
├── w2s_processW2Stream.js.html
├── w2s_processW2Url.js.html
├── w8bene_deleteW8BENE.js.html
├── w8bene_getW8BENE.js.html
├── w8bene_getW8BENEs.js.html
├── w8bene_processW8BENE.js.html
├── w8bene_processW8BENEBase64.js.html
├── w8bene_processW8BENEStream.js.html
├── w8bene_processW8BENEUrl.js.html
├── w9s_deleteW9.js.html
├── w9s_getW9.js.html
├── w9s_getW9s.js.html
├── w9s_processW9.js.html
├── w9s_processW9Base64.js.html
├── w9s_processW9Stream.js.html
└── w9s_processW9Url.js.html
├── jest.config.js
├── jsdoc.json
├── lib
├── anydocs
│ ├── deleteAnyDocument.js
│ ├── getAnyDocument.js
│ ├── getAnyDocuments.js
│ ├── processAnyDocument.js
│ ├── processAnyDocumentBase64.js
│ ├── processAnyDocumentStream.js
│ └── processAnyDocumentUrl.js
├── bankstatements
│ ├── deleteBankStatement.js
│ ├── getBankStatement.js
│ ├── getBankStatements.js
│ ├── processBankStatement.js
│ ├── processBankStatementBase64.js
│ ├── processBankStatementStream.js
│ └── processBankStatementUrl.js
├── businesscards
│ ├── deleteBusinessCard.js
│ ├── getBusinessCard.js
│ ├── getBusinessCards.js
│ ├── processBusinessCard.js
│ ├── processBusinessCardBase64.js
│ ├── processBusinessCardStream.js
│ └── processBusinessCardUrl.js
├── checks
│ ├── deleteCheck.js
│ ├── getCheck.js
│ ├── getChecks.js
│ ├── processCheck.js
│ ├── processCheckBase64.js
│ ├── processCheckStream.js
│ └── processCheckUrl.js
├── client
│ ├── client.js
│ ├── constructor.js
│ ├── function.js
│ ├── generateSignature.js
│ ├── getHeaders.js
│ ├── getUrl.js
│ └── request.js
├── documents
│ ├── deleteDocument.js
│ ├── getDocument.js
│ ├── getDocuments.js
│ ├── processDocument.js
│ ├── processDocumentBase64.js
│ ├── processDocumentStream.js
│ ├── processDocumentUrl.js
│ ├── tags
│ │ ├── addTag.js
│ │ ├── addTags.js
│ │ ├── deleteTags.js
│ │ └── replaceTags.js
│ └── updateDocument.js
├── types
│ ├── BillTo.ts
│ ├── BoundingElement.ts
│ ├── Client.ts
│ ├── LineItem.ts
│ ├── Payment.ts
│ ├── ShipTo.ts
│ ├── Tag.ts
│ ├── TaxLine.ts
│ ├── Vendor.ts
│ ├── VeryfiDocument.ts
│ └── VeryfiExtraArgs.ts
├── w2s
│ ├── deleteW2.js
│ ├── getW2.js
│ ├── getW2s.js
│ ├── processW2.js
│ ├── processW2Base64.js
│ ├── processW2Stream.js
│ └── processW2Url.js
├── w8bene
│ ├── deleteW8BENE.js
│ ├── getW8BENE.js
│ ├── getW8BENEs.js
│ ├── processW8BENE.js
│ ├── processW8BENEBase64.js
│ ├── processW8BENEStream.js
│ └── processW8BENEUrl.js
└── w9s
│ ├── deleteW9.js
│ ├── getW9.js
│ ├── getW9s.js
│ ├── processW9.js
│ ├── processW9Base64.js
│ ├── processW9Stream.js
│ └── processW9Url.js
├── mocks
├── addTag.json
├── deleteDocument.json
├── deleteTags.json
├── document.json
├── documents.json
├── getAnyDocuments.json
├── getBankStatements.json
├── getBusinessCards.json
├── getChecks.json
├── getTags.json
├── getW2s.json
├── getW8benes.json
├── getW9s.json
├── processAnyDocument.json
├── processBankStatement.json
├── processBusinesscard.json
├── processCheck.json
├── processW2.json
├── processW8bene.json
├── processW9.json
├── receipt.json
└── updateDocument.json
├── package-lock.json
├── package.json
├── resources
├── bankstatement.pdf
├── business_card.jpg
├── check.pdf
├── driver_license.png
├── receipt.png
├── w2.png
├── w8bene.pdf
└── w9.pdf
├── test
└── main.test.js
├── tests
└── main.test.ts
└── tsconfig.json
/.github/workflows/node.js.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: Node.js CI
5 |
6 | on:
7 | push:
8 | branches: [ main ]
9 | pull_request:
10 | branches: [ main ]
11 |
12 | jobs:
13 | build:
14 |
15 | runs-on: ubuntu-latest
16 |
17 | strategy:
18 | matrix:
19 | node-version: [16.x]
20 | # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21 |
22 | steps:
23 | - uses: actions/checkout@v3
24 | - name: Use Node.js ${{ matrix.node-version }}
25 | uses: actions/setup-node@v3
26 | with:
27 | node-version: ${{ matrix.node-version }}
28 | cache: 'npm'
29 | - run: npm ci
30 | - run: npm run build --if-present
31 | - run: npm test -- --coverage
32 | env:
33 | CI: true
34 | VERYFI_CLIENT_ID: ${{ secrets.VERYFI_CLIENT_ID }}
35 | VERYFI_CLIENT_SECRET: ${{ secrets.VERYFI_CLIENT_SECRET }}
36 | VERYFI_USERNAME: ${{ secrets.VERYFI_USERNAME }}
37 | VERYFI_API_KEY: ${{ secrets.VERYFI_API_KEY }}
38 | VERYFI_URL: ${{ secrets.VERYFI_URL }}
39 |
--------------------------------------------------------------------------------
/.github/workflows/npm-publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3 |
4 | name: Node.js Package
5 |
6 | on:
7 | release:
8 | types: [created]
9 |
10 | jobs:
11 | build:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v3
15 | - uses: actions/setup-node@v3
16 | with:
17 | node-version: 16
18 | - run: npm ci
19 |
20 | publish-npm:
21 | needs: build
22 | runs-on: ubuntu-latest
23 | steps:
24 | - uses: actions/checkout@v3
25 | - uses: actions/setup-node@v3
26 | with:
27 | node-version: 16
28 | registry-url: https://registry.npmjs.org/
29 | - run: npm ci
30 | - run: npm config set "@veryfi:registry" "https://nexus.veryfi.com/repository/npm/"
31 | - run: npm config set "//nexus.veryfi.com/repository/npm/:_authToken" "${{secrets.nexus_npm_token}}"
32 | - run: npm publish
33 | env:
34 | NODE_AUTH_TOKEN: ${{secrets.npm_token}}
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .idea/
3 | coverage/
4 | package-lock.json
5 | *.xml
6 | .env
7 | .DS_Store
8 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | # Release process
2 |
3 | GitHub Actions is configured to handle the release and upload to NPM. To initiate a release, simply create a new tag and publish it at https://github.com/veryfi/veryfi-nodejs/releases
4 |
5 | ## Versioning
6 |
7 | package.json manages all the package metadata:
8 | * it uses version to track the current version of the package
9 | * it uses main to point to the entry point of the package
10 | * it uses typings to point to the typescript definition file
11 | * it uses scripts to create documentation, run tests, and build the package
12 |
--------------------------------------------------------------------------------
/docs/checks_deleteCheck.js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
31 |
32 |
checks/deleteCheck.js
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | const Client = require('../client/constructor');
43 | /**
44 | * Delete a Check from Veryfi. https://docs.veryfi.com/api/checks/delete-a-check/
45 | *
46 | * @memberof Client
47 | * @param {string} document_id ID of the document you'd like to delete
48 | */
49 | Client.prototype.delete_check = async function (document_id) {
50 | let endpoint_name = `/checks/${document_id}/`;
51 | let request_arguments = {"id": document_id};
52 | return this._request("DELETE", endpoint_name, request_arguments);
53 | }
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
31 |
32 |
w2s/deleteW2.js
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | const Client = require('../client/constructor');
43 | /**
44 | * Delete w2 document from Veryfi https://docs.veryfi.com/api/w2s/delete-a-w-2/
45 | *
46 | * @memberof Client
47 | * @param {string} document_id ID of the document you'd like to delete
48 | */
49 | Client.prototype.delete_w2 = async function (document_id) {
50 | let endpoint_name = `/w2s/${document_id}/`;
51 | let request_arguments = {"id": document_id};
52 | return this._request("DELETE", endpoint_name, request_arguments);
53 | }
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
31 |
32 |
w2s/getW2s.js
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | const Client = require('../client/constructor');
43 | /**
44 | * Get all w2 documents. https://docs.veryfi.com/api/w2s/get-w-2-s/
45 | * @memberOf Client
46 | * @param {Object} kwargs Additional request parameters
47 | * @return {Array} An array of JSON with all w2 documents.
48 | */
49 | Client.prototype.get_w2s = async function ( {...kwargs} = {}) {
50 | let endpoint_name = "/w2s/";
51 | let request_arguments = {};
52 | let response = await this._request("GET", endpoint_name, request_arguments, kwargs, false);
53 | return response['data'];
54 | }
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
31 |
32 |
w8bene/deleteW8BENE.js
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | const Client = require('../client/constructor');
43 | /**
44 | * Delete a W-8BEN-E from Veryfi. https://docs.veryfi.com/api/w-8ben-e/delete-a-w-8-ben-e/
45 | *
46 | * @memberof Client
47 | * @param {string} document_id ID of the document you'd like to delete
48 | */
49 | Client.prototype.delete_w8bene = async function (document_id) {
50 | let endpoint_name = `/w-8ben-e/${document_id}/`;
51 | let request_arguments = {"id": document_id};
52 | return this._request("DELETE", endpoint_name, request_arguments);
53 | }
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
31 |
32 |
w9s/deleteW9.js
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | const Client = require('../client/constructor');
43 | /**
44 | * Delete w9 document from Veryfi. https://docs.veryfi.com/api/w9s/delete-a-w-9/
45 | *
46 | * @memberof Client
47 | * @param {string} document_id ID of the document you'd like to delete
48 | */
49 | Client.prototype.delete_w9 = async function (document_id) {
50 | let endpoint_name = `/w9s/${document_id}/`;
51 | let request_arguments = {"id": document_id};
52 | return this._request("DELETE", endpoint_name, request_arguments);
53 | }
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |