From ae002bd30701c1a31890d72fdb3b43e5483e17fc Mon Sep 17 00:00:00 2001 From: Alejandro Uribe Date: Fri, 1 Nov 2024 09:22:06 -0500 Subject: [PATCH] Move from template_name to blueprint_name --- lib/anydocs/processAnyDocumentBase64.js | 8 ++++---- lib/anydocs/processAnyDocumentStream.js | 6 +++--- lib/anydocs/processAnyDocumentUrl.js | 6 +++--- lib/types/Client.ts | 16 ++++++++-------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/anydocs/processAnyDocumentBase64.js b/lib/anydocs/processAnyDocumentBase64.js index c31c88e..99a58df 100644 --- a/lib/anydocs/processAnyDocumentBase64.js +++ b/lib/anydocs/processAnyDocumentBase64.js @@ -5,7 +5,7 @@ const Client = require('../client/constructor'); * @memberof Client * @param {String} file_name The file name including the extension * @param {String} file_base64_string To submit a file for data extraction, encode the file in Base64 format and ensure it includes the MIME type. The Base64 string should follow this structure: data:${mimeType};base64,${base64String} - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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 @@ -13,16 +13,16 @@ const Client = require('../client/constructor'); Client.prototype.process_any_document_from_base64 = async function ( file_name, file_base64_string, - template_name, + blueprint_name, max_pages_to_process = 20, {...kwargs} = {} ) { - + let endpoint_name = "/any-documents/"; let request_arguments = { "file_name": file_name, "file_data": file_base64_string, - "template_name": template_name, + "blueprint_name": blueprint_name, "max_pages_to_process": max_pages_to_process, }; request_arguments = Object.assign(request_arguments, kwargs); diff --git a/lib/anydocs/processAnyDocumentStream.js b/lib/anydocs/processAnyDocumentStream.js index c3ae325..eaedfec 100644 --- a/lib/anydocs/processAnyDocumentStream.js +++ b/lib/anydocs/processAnyDocumentStream.js @@ -7,7 +7,7 @@ const Client = require('../client/constructor'); * @memberof Client * @param {ReadStream} file ReadStream of a file to submit for data extraction * @param {String} file_name The file name including the extension - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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 @@ -15,7 +15,7 @@ const Client = require('../client/constructor'); Client.prototype.process_any_document_from_stream = async function ( file, file_name, - template_name, + blueprint_name, max_pages_to_process = 20, {...kwargs} = {} ) { @@ -24,7 +24,7 @@ Client.prototype.process_any_document_from_stream = async function ( let request_arguments = { "file_name": file_name, "file": file, - "template_name": template_name, + "template_name": blueprint_name, "max_pages_to_process": max_pages_to_process, }; request_arguments = Object.assign(request_arguments, kwargs); diff --git a/lib/anydocs/processAnyDocumentUrl.js b/lib/anydocs/processAnyDocumentUrl.js index 1499365..4e2f188 100644 --- a/lib/anydocs/processAnyDocumentUrl.js +++ b/lib/anydocs/processAnyDocumentUrl.js @@ -6,14 +6,14 @@ const Client = require('../client/constructor'); * * @memberof Client * @param {String} file_url url file to submit for data extraction - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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 */ Client.prototype.process_any_document_from_url = async function ( file_url, - template_name, + blueprint_name, max_pages_to_process = 20, {...kwargs} = {} ) { @@ -21,7 +21,7 @@ Client.prototype.process_any_document_from_url = async function ( let endpoint_name = "/any-documents/"; let request_arguments = { "file_url": file_url, - "template_name": template_name, + "template_name": blueprint_name, "max_pages_to_process": max_pages_to_process, }; request_arguments = Object.assign(request_arguments, kwargs); diff --git a/lib/types/Client.ts b/lib/types/Client.ts index 8c808de..906873a 100644 --- a/lib/types/Client.ts +++ b/lib/types/Client.ts @@ -237,14 +237,14 @@ export declare class Client { * * @memberof Client * @param {String} file_path Path on disk to a file to submit for data extraction - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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( file_path: string, - template_name?: string, + blueprint_name?: string, max_pages_to_process?: number, {...kwargs}?: VeryfiExtraArgs ): Promise; @@ -255,7 +255,7 @@ export declare class Client { * @memberof Client * @param {ReadStream} file ReadStream of a file to submit for data extraction * @param {String} file_name The file name including the extension - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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 @@ -263,7 +263,7 @@ export declare class Client { public process_any_document_from_stream( file: fs.ReadStream, file_name: string, - template_name?: string, + blueprint_name?: string, max_pages_to_process?: number, {...kwargs}?: VeryfiExtraArgs ): Promise; @@ -274,7 +274,7 @@ export declare class Client { * @memberof Client * @param {String} file_name The file name including the extension * @param {String} file_base64_string To submit a file for data extraction, encode the file in Base64 format and ensure it includes the MIME type. The Base64 string should follow this structure: data:${mimeType};base64,${base64String} - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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 @@ -282,7 +282,7 @@ export declare class Client { public process_any_document_from_base64( file_name: string, file_base64_string: string, - template_name?: string, + blueprint_name?: string, max_pages_to_process?: number, {...kwargs}?: VeryfiExtraArgs ): Promise; @@ -294,14 +294,14 @@ export declare class Client { * * @memberof Client * @param {String} file_url url file to submit for data extraction - * @param {String} template_name name of the extraction templates. + * @param {String} blueprint_name name of the extraction templates. * @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_url( file_url: string, - template_name?: string, + blueprint_name?: string, max_pages_to_process?: number, {...kwargs}?: VeryfiExtraArgs ): Promise;