@veryfi/veryfi-sdk 1.4.1 → 1.4.3
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/lib/anydocs/processAnyDocumentStream.js +1 -1
- package/lib/bankstatements/processBankStatementStream.js +1 -1
- package/lib/businesscards/processBusinessCardStream.js +1 -1
- package/lib/checks/processCheckStream.js +1 -1
- package/lib/client/getHeaders.js +1 -1
- package/lib/documents/processDocument.js +0 -1
- package/lib/documents/processDocumentStream.js +1 -1
- package/lib/types/Client.ts +18 -19
- package/lib/w2s/processW2Stream.js +1 -1
- package/lib/w8bene/processW8BENEStream.js +1 -1
- package/lib/w9s/processW9Stream.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ const Client = require('../client/constructor');
|
|
|
5
5
|
* veryfi_client.process_any_document('file/path','blue_print')
|
|
6
6
|
*
|
|
7
7
|
* @memberof Client
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
|
|
9
9
|
* @param {String} file_name The file name including the extension
|
|
10
10
|
* @param {String} blueprint_name The name of the extraction blueprints to use.
|
|
11
11
|
* @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
|
|
@@ -3,7 +3,7 @@ const Client = require('../client/constructor');
|
|
|
3
3
|
* Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
|
|
4
4
|
*
|
|
5
5
|
* @memberof Client
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
7
7
|
* @param {String} file_name The file name including the extension
|
|
8
8
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
9
9
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -3,7 +3,7 @@ const Client = require('../client/constructor');
|
|
|
3
3
|
* Process Business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
|
|
4
4
|
*
|
|
5
5
|
* @memberof Client
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
7
7
|
* @param {String} file_name The file name including the extension
|
|
8
8
|
* @param {Object} kwargs Additional request parameters
|
|
9
9
|
* @returns {JSON} Data extracted from the document
|
|
@@ -3,7 +3,7 @@ const Client = require('../client/constructor');
|
|
|
3
3
|
* Process Check and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
|
|
4
4
|
*
|
|
5
5
|
* @memberof Client
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
7
7
|
* @param {String} file_name The file name including the extension
|
|
8
8
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
9
9
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
package/lib/client/getHeaders.js
CHANGED
|
@@ -8,7 +8,7 @@ const Client = require('../client/constructor');
|
|
|
8
8
|
*/
|
|
9
9
|
Client.prototype._get_headers = function (has_files = false) {
|
|
10
10
|
let final_headers = {
|
|
11
|
-
"User-Agent": "Node.js Veryfi-Nodejs/1.4.
|
|
11
|
+
"User-Agent": "Node.js Veryfi-Nodejs/1.4.3",
|
|
12
12
|
"Accept": "application/json",
|
|
13
13
|
"Content-Type": "application/json",
|
|
14
14
|
"Client-Id": this.client_id,
|
|
@@ -9,7 +9,7 @@ const Client = require('../client/constructor');
|
|
|
9
9
|
* {'extra': 'parameters'})
|
|
10
10
|
*
|
|
11
11
|
* @memberof Client
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
|
|
13
13
|
* @param {String} file_name The file name including the extension
|
|
14
14
|
* @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
|
|
15
15
|
* @param {Object} kwargs Additional request parameters
|
package/lib/types/Client.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
1
|
import {VeryfiDocument} from "./VeryfiDocument";
|
|
3
2
|
import {JsonObject, VeryfiExtraArgs} from "./VeryfiExtraArgs";
|
|
4
3
|
import {Tag} from "./Tag";
|
|
4
|
+
import * as stream from "node:stream";
|
|
5
5
|
|
|
6
6
|
export declare class Client {
|
|
7
7
|
/**
|
|
@@ -134,17 +134,15 @@ export declare class Client {
|
|
|
134
134
|
* Process a document and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
|
|
135
135
|
*
|
|
136
136
|
* @memberof Client
|
|
137
|
-
* @param {
|
|
137
|
+
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
|
|
138
138
|
* @param {String} file_name The file name including the extension
|
|
139
|
-
* @param {Array} categories List of categories Veryfi can use to categorize the document
|
|
140
139
|
* @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
|
|
141
140
|
* @param {Object} kwargs Additional request parameters
|
|
142
141
|
* @returns {JSON} Data extracted from the document
|
|
143
142
|
*/
|
|
144
143
|
public process_document_from_stream(
|
|
145
|
-
file:
|
|
144
|
+
file: stream.Readable,
|
|
146
145
|
file_name: string,
|
|
147
|
-
categories?: string[],
|
|
148
146
|
auto_delete?: boolean,
|
|
149
147
|
{...kwargs}?: VeryfiExtraArgs
|
|
150
148
|
): Promise<VeryfiDocument>;
|
|
@@ -253,7 +251,7 @@ export declare class Client {
|
|
|
253
251
|
* Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
|
|
254
252
|
*
|
|
255
253
|
* @memberof Client
|
|
256
|
-
* @param {
|
|
254
|
+
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
|
|
257
255
|
* @param {String} file_name The file name including the extension
|
|
258
256
|
* @param {String} blueprint_name The name of the extraction blueprints to use.
|
|
259
257
|
* @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
|
|
@@ -261,7 +259,7 @@ export declare class Client {
|
|
|
261
259
|
* @returns {JSON} Data extracted from the document
|
|
262
260
|
*/
|
|
263
261
|
public process_any_document_from_stream(
|
|
264
|
-
file:
|
|
262
|
+
file: stream.Readable,
|
|
265
263
|
file_name: string,
|
|
266
264
|
blueprint_name?: string,
|
|
267
265
|
max_pages_to_process?: number,
|
|
@@ -320,6 +318,7 @@ export declare class Client {
|
|
|
320
318
|
* @param {number} document_id The unique identifier of the document.
|
|
321
319
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
322
320
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
321
|
+
* @param kwargs Additional request parameters
|
|
323
322
|
* @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
|
|
324
323
|
*/
|
|
325
324
|
public get_bank_statement(document_id: number,
|
|
@@ -368,7 +367,7 @@ export declare class Client {
|
|
|
368
367
|
* Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
|
|
369
368
|
*
|
|
370
369
|
* @memberof Client
|
|
371
|
-
* @param {
|
|
370
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
372
371
|
* @param {String} file_name The file name including the extension
|
|
373
372
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
374
373
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -376,7 +375,7 @@ export declare class Client {
|
|
|
376
375
|
* @returns {JSON} Data extracted from the document
|
|
377
376
|
*/
|
|
378
377
|
public process_bank_statement_from_stream(
|
|
379
|
-
file:
|
|
378
|
+
file: stream.Readable,
|
|
380
379
|
file_name: string,
|
|
381
380
|
bounding_boxes?: boolean,
|
|
382
381
|
confidence_details?: boolean,
|
|
@@ -482,13 +481,13 @@ export declare class Client {
|
|
|
482
481
|
* Process business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
|
|
483
482
|
*
|
|
484
483
|
* @memberof Client
|
|
485
|
-
* @param {
|
|
484
|
+
* @param {stream.Readable} file ReadStream of a file to submit for data extraction
|
|
486
485
|
* @param {String} file_name The file name including the extension
|
|
487
486
|
* @param {Object} kwargs Additional request parameters
|
|
488
487
|
* @returns {JSON} Data extracted from the document
|
|
489
488
|
*/
|
|
490
489
|
public process_business_card_from_stream(
|
|
491
|
-
file:
|
|
490
|
+
file: stream.Readable,
|
|
492
491
|
file_name: string,
|
|
493
492
|
{...kwargs}?: VeryfiExtraArgs
|
|
494
493
|
): Promise<JsonObject>;
|
|
@@ -606,7 +605,7 @@ export declare class Client {
|
|
|
606
605
|
* Process check and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
|
|
607
606
|
*
|
|
608
607
|
* @memberof Client
|
|
609
|
-
* @param {
|
|
608
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
610
609
|
* @param {String} file_name The file name including the extension
|
|
611
610
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
612
611
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -614,7 +613,7 @@ export declare class Client {
|
|
|
614
613
|
* @returns {JSON} Data extracted from the document
|
|
615
614
|
*/
|
|
616
615
|
public process_check_from_stream(
|
|
617
|
-
file:
|
|
616
|
+
file: stream.Readable,
|
|
618
617
|
file_name: string,
|
|
619
618
|
bounding_boxes?: boolean,
|
|
620
619
|
confidence_details?: boolean,
|
|
@@ -703,7 +702,7 @@ export declare class Client {
|
|
|
703
702
|
* Process w2 and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
|
|
704
703
|
*
|
|
705
704
|
* @memberof Client
|
|
706
|
-
* @param {
|
|
705
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
707
706
|
* @param {String} file_name The file name including the extension
|
|
708
707
|
* @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
|
|
709
708
|
* @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.
|
|
@@ -711,7 +710,7 @@ export declare class Client {
|
|
|
711
710
|
* @returns {JSON} Data extracted from the document
|
|
712
711
|
*/
|
|
713
712
|
public process_w2_from_stream(
|
|
714
|
-
file:
|
|
713
|
+
file: stream.Readable,
|
|
715
714
|
file_name: string,
|
|
716
715
|
auto_delete?: boolean,
|
|
717
716
|
max_pages_to_process?: number,
|
|
@@ -826,7 +825,7 @@ export declare class Client {
|
|
|
826
825
|
* 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/
|
|
827
826
|
*
|
|
828
827
|
* @memberof Client
|
|
829
|
-
* @param {
|
|
828
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
830
829
|
* @param {String} file_name The file name including the extension.
|
|
831
830
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
832
831
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -834,7 +833,7 @@ export declare class Client {
|
|
|
834
833
|
* @returns {JSON} Data extracted from the document
|
|
835
834
|
*/
|
|
836
835
|
public process_w8bene_from_stream(
|
|
837
|
-
file:
|
|
836
|
+
file: stream.Readable,
|
|
838
837
|
file_name: string,
|
|
839
838
|
bounding_boxes?: boolean,
|
|
840
839
|
confidence_details?: boolean,
|
|
@@ -943,7 +942,7 @@ export declare class Client {
|
|
|
943
942
|
* Process w9 and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
|
|
944
943
|
*
|
|
945
944
|
* @memberof Client
|
|
946
|
-
* @param {
|
|
945
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
947
946
|
* @param {String} file_name The file name including the extension.
|
|
948
947
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
949
948
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -951,7 +950,7 @@ export declare class Client {
|
|
|
951
950
|
* @returns {JSON} Data extracted from the document
|
|
952
951
|
*/
|
|
953
952
|
public process_w9_from_stream(
|
|
954
|
-
file:
|
|
953
|
+
file: stream.Readable,
|
|
955
954
|
file_name: string,
|
|
956
955
|
bounding_boxes?: boolean,
|
|
957
956
|
confidence_details?: boolean,
|
|
@@ -2,7 +2,7 @@ const Client = require('../client/constructor');
|
|
|
2
2
|
/**
|
|
3
3
|
* Upload a w2 document from a buffer. https://docs.veryfi.com/api/w2s/process-a-w-2/
|
|
4
4
|
* @memberOf Client
|
|
5
|
-
* @param {
|
|
5
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
6
6
|
* @param {String} file_name The file name including the extension
|
|
7
7
|
* @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
|
|
8
8
|
* @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.
|
|
@@ -3,7 +3,7 @@ const Client = require('../client/constructor');
|
|
|
3
3
|
* Upload a W-8BEN-E document from a buffer. https://docs.veryfi.com/api/w-8ben-e/process-a-w-8-ben-e/
|
|
4
4
|
*
|
|
5
5
|
* @memberof Client
|
|
6
|
-
* @param {
|
|
6
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
7
7
|
* @param {String} file_name The file name including the extension
|
|
8
8
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
9
9
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|
|
@@ -2,7 +2,7 @@ const Client = require('../client/constructor');
|
|
|
2
2
|
/**
|
|
3
3
|
* Upload a w9 document from a buffer. https://docs.veryfi.com/api/w9s/process-a-w-9/
|
|
4
4
|
* @memberof Client
|
|
5
|
-
* @param {
|
|
5
|
+
* @param {stream.Readable} file file to submit for data extraction
|
|
6
6
|
* @param {String} file_name The file name including the extension
|
|
7
7
|
* @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
|
|
8
8
|
* @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
|