Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/lp 949 update nodejs #47

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/anydocs/processAnyDocumentStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Client = require('../client/constructor');
* veryfi_client.process_any_document('file/path','blue_print')
*
* @memberof Client
* @param {ReadStream} file ReadStream of a file to submit for data extraction
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {String} blueprint_name The name of the extraction blueprints to use.
* @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
Expand Down
2 changes: 1 addition & 1 deletion lib/bankstatements/processBankStatementStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Client = require('../client/constructor');
* Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
Expand Down
2 changes: 1 addition & 1 deletion lib/businesscards/processBusinessCardStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Client = require('../client/constructor');
* Process Business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
Expand Down
2 changes: 1 addition & 1 deletion lib/checks/processCheckStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Client = require('../client/constructor');
* Process Check and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
Expand Down
2 changes: 1 addition & 1 deletion lib/client/getHeaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Client = require('../client/constructor');
*/
Client.prototype._get_headers = function (has_files = false) {
let final_headers = {
"User-Agent": "Node.js Veryfi-Nodejs/1.4.1",
"User-Agent": "Node.js Veryfi-Nodejs/1.4.2",
"Accept": "application/json",
"Content-Type": "application/json",
"Client-Id": this.client_id,
Expand Down
2 changes: 1 addition & 1 deletion lib/documents/processDocumentStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Client = require('../client/constructor');
* {'extra': 'parameters'})
*
* @memberof Client
* @param {ReadStream} file ReadStream of a file to submit for data extraction
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
* @param {Object} kwargs Additional request parameters
Expand Down
33 changes: 17 additions & 16 deletions lib/types/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from "fs";
import {VeryfiDocument} from "./VeryfiDocument";
import {JsonObject, VeryfiExtraArgs} from "./VeryfiExtraArgs";
import {Tag} from "./Tag";
import * as stream from "node:stream";

export declare class Client {
/**
Expand Down Expand Up @@ -134,15 +135,15 @@ export declare class Client {
* Process a document and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
*
* @memberof Client
* @param {fs.ReadStream} file ReadStream of a file to submit for data extraction
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {Array} categories List of categories Veryfi can use to categorize the document
* @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_document_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
categories?: string[],
auto_delete?: boolean,
Expand Down Expand Up @@ -253,15 +254,15 @@ export declare class Client {
* Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
*
* @memberof Client
* @param {ReadStream} file ReadStream of a file to submit for data extraction
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {String} blueprint_name The name of the extraction blueprints to use.
* @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_any_document_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
blueprint_name?: string,
max_pages_to_process?: number,
Expand Down Expand Up @@ -368,15 +369,15 @@ export declare class Client {
* Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_bank_statement_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
bounding_boxes?: boolean,
confidence_details?: boolean,
Expand Down Expand Up @@ -482,13 +483,13 @@ export declare class Client {
* Process business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
*
* @memberof Client
* @param {fs.ReadStream} file ReadStream of a file to submit for data extraction
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_business_card_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
{...kwargs}?: VeryfiExtraArgs
): Promise<JsonObject>;
Expand Down Expand Up @@ -606,15 +607,15 @@ export declare class Client {
* Process check and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_check_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
bounding_boxes?: boolean,
confidence_details?: boolean,
Expand Down Expand Up @@ -703,15 +704,15 @@ export declare class Client {
* Process w2 and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
* @param {int} max_pages_to_process When sending a long document to Veryfi for processing, this parameter controls how many pages of the document will be read and processed, starting from page 1.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_w2_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
auto_delete?: boolean,
max_pages_to_process?: number,
Expand Down Expand Up @@ -826,15 +827,15 @@ export declare class Client {
* Process W-8BEN-E and extract all the fields from it. https://docs.veryfi.com/api/w-8ben-e/process-a-w-8-ben-e/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension.
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_w8bene_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
bounding_boxes?: boolean,
confidence_details?: boolean,
Expand Down Expand Up @@ -943,15 +944,15 @@ export declare class Client {
* Process w9 and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension.
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
* @param {Object} kwargs Additional request parameters
* @returns {JSON} Data extracted from the document
*/
public process_w9_from_stream(
file: fs.ReadStream,
file: stream.Readable,
file_name: string,
bounding_boxes?: boolean,
confidence_details?: boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/w2s/processW2Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Client = require('../client/constructor');
/**
* Upload a w2 document from a buffer. https://docs.veryfi.com/api/w2s/process-a-w-2/
* @memberOf Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
* @param {int} max_pages_to_process When sending a long document to Veryfi for processing, this parameter controls how many pages of the document will be read and processed, starting from page 1.
Expand Down
2 changes: 1 addition & 1 deletion lib/w8bene/processW8BENEStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Client = require('../client/constructor');
* Upload a W-8BEN-E document from a buffer. https://docs.veryfi.com/api/w-8ben-e/process-a-w-8-ben-e/
*
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
Expand Down
2 changes: 1 addition & 1 deletion lib/w9s/processW9Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Client = require('../client/constructor');
/**
* Upload a w9 document from a buffer. https://docs.veryfi.com/api/w9s/process-a-w-9/
* @memberof Client
* @param {fs.ReadStream} file file to submit for data extraction
* @param {stream.Readable} file file to submit for data extraction
* @param {String} file_name The file name including the extension
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@veryfi/veryfi-sdk",
"version": "1.4.1",
"version": "1.4.2",
"description": "Node.js module for communicating with the Veryfi OCR API",
"main": "lib/client/client.js",
"typings": "lib/types/Client.ts",
Expand Down
Loading