@veryfi/veryfi-sdk 1.3.1 → 1.4.0

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.
Files changed (83) hide show
  1. package/README.md +443 -145
  2. package/lib/anydocs/deleteAnyDocument.js +12 -0
  3. package/lib/anydocs/getAnyDocument.js +22 -0
  4. package/lib/anydocs/getAnyDocuments.js +30 -0
  5. package/lib/anydocs/processAnyDocument.js +33 -0
  6. package/lib/anydocs/processAnyDocumentBase64.js +31 -0
  7. package/lib/anydocs/processAnyDocumentStream.js +33 -0
  8. package/lib/anydocs/processAnyDocumentUrl.js +30 -0
  9. package/lib/bankstatements/deleteBankStatement.js +12 -0
  10. package/lib/bankstatements/getBankStatement.js +24 -0
  11. package/lib/bankstatements/getBankStatements.js +28 -0
  12. package/lib/bankstatements/processBankStatement.js +33 -0
  13. package/lib/bankstatements/processBankStatementBase64.js +31 -0
  14. package/lib/bankstatements/processBankStatementStream.js +31 -0
  15. package/lib/bankstatements/processBankStatementUrl.js +30 -0
  16. package/lib/businesscards/deleteBusinessCard.js +12 -0
  17. package/lib/businesscards/getBusinessCard.js +24 -0
  18. package/lib/businesscards/getBusinessCards.js +28 -0
  19. package/lib/businesscards/processBusinessCard.js +27 -0
  20. package/lib/businesscards/processBusinessCardBase64.js +25 -0
  21. package/lib/businesscards/processBusinessCardStream.js +25 -0
  22. package/lib/businesscards/processBusinessCardUrl.js +24 -0
  23. package/lib/checks/deleteCheck.js +12 -0
  24. package/lib/checks/getCheck.js +24 -0
  25. package/lib/checks/getChecks.js +28 -0
  26. package/lib/checks/processCheck.js +33 -0
  27. package/lib/checks/processCheckBase64.js +31 -0
  28. package/lib/checks/processCheckStream.js +31 -0
  29. package/lib/checks/processCheckUrl.js +30 -0
  30. package/lib/client/client.js +63 -0
  31. package/lib/client/constructor.js +27 -0
  32. package/lib/client/function.js +6 -0
  33. package/lib/client/generateSignature.js +26 -0
  34. package/lib/client/getHeaders.js +21 -0
  35. package/lib/client/getUrl.js +9 -0
  36. package/lib/client/request.js +58 -0
  37. package/lib/documents/deleteDocument.js +12 -0
  38. package/lib/documents/getDocument.js +14 -0
  39. package/lib/documents/getDocuments.js +31 -0
  40. package/lib/documents/processDocument.js +37 -0
  41. package/lib/documents/processDocumentBase64.js +37 -0
  42. package/lib/documents/processDocumentStream.js +33 -0
  43. package/lib/documents/processDocumentUrl.js +41 -0
  44. package/lib/documents/tags/addTag.js +14 -0
  45. package/lib/documents/tags/addTags.js +14 -0
  46. package/lib/documents/tags/deleteTags.js +12 -0
  47. package/lib/documents/tags/replaceTags.js +14 -0
  48. package/lib/documents/updateDocument.js +17 -0
  49. package/lib/types/BillTo.ts +11 -0
  50. package/lib/types/BoundingElement.ts +6 -0
  51. package/lib/types/Client.ts +1058 -0
  52. package/lib/types/LineItem.ts +24 -0
  53. package/lib/types/Payment.ts +8 -0
  54. package/lib/types/ShipTo.ts +7 -0
  55. package/lib/types/Tag.ts +4 -0
  56. package/lib/types/TaxLine.ts +9 -0
  57. package/lib/types/Vendor.ts +15 -0
  58. package/lib/types/VeryfiDocument.ts +93 -0
  59. package/lib/types/VeryfiExtraArgs.ts +9 -0
  60. package/lib/w2s/deleteW2.js +12 -0
  61. package/lib/w2s/getW2.js +17 -0
  62. package/lib/w2s/getW2s.js +13 -0
  63. package/lib/w2s/processW2.js +28 -0
  64. package/lib/w2s/processW2Base64.js +30 -0
  65. package/lib/w2s/processW2Stream.js +30 -0
  66. package/lib/w2s/processW2Url.js +32 -0
  67. package/lib/w8bene/deleteW8BENE.js +12 -0
  68. package/lib/w8bene/getW8BENE.js +24 -0
  69. package/lib/w8bene/getW8BENEs.js +28 -0
  70. package/lib/w8bene/processW8BENE.js +33 -0
  71. package/lib/w8bene/processW8BENEBase64.js +31 -0
  72. package/lib/w8bene/processW8BENEStream.js +31 -0
  73. package/lib/w8bene/processW8BENEUrl.js +30 -0
  74. package/lib/w9s/deleteW9.js +12 -0
  75. package/lib/w9s/getW9.js +24 -0
  76. package/lib/w9s/getW9s.js +28 -0
  77. package/lib/w9s/processW9.js +30 -0
  78. package/lib/w9s/processW9Base64.js +31 -0
  79. package/lib/w9s/processW9Stream.js +31 -0
  80. package/lib/w9s/processW9Url.js +27 -0
  81. package/package.json +4 -4
  82. package/lib/main.js +0 -569
  83. package/lib/types/main.d.ts +0 -413
@@ -0,0 +1,1058 @@
1
+ import fs from "fs";
2
+ import {VeryfiDocument} from "./VeryfiDocument";
3
+ import {JsonObject, VeryfiExtraArgs} from "./VeryfiExtraArgs";
4
+ import {Tag} from "./Tag";
5
+
6
+ export declare class Client {
7
+ /**
8
+ * Create instance of a Client
9
+ * @class
10
+ * @param {string} client_id Your Veryfi client id
11
+ * @param {string | undefined} client_secret Your Veryfi client secret
12
+ * @param {string} username Your Veryfi username
13
+ * @param {string} api_key Your Veryfi API key
14
+ * @param {string} base_url
15
+ * @param {number} timeout
16
+ */
17
+ constructor(
18
+ client_id: string,
19
+ client_secret: string | undefined,
20
+ username: string,
21
+ api_key: string,
22
+ base_url?: string,
23
+ timeout?: number
24
+ );
25
+
26
+ client_id: string;
27
+ client_secret: string | undefined;
28
+ username: string;
29
+ api_key: string;
30
+ base_url: string;
31
+ api_version: string;
32
+ private _get_headers;
33
+ private _get_url;
34
+ private _generate_signature;
35
+
36
+ /**
37
+ * Submit the HTTP request.
38
+ * @private
39
+ * @param {string} http_verb HTTP Method
40
+ * @param {string} endpoint_name Endpoint name such as 'documents', 'users', etc.
41
+ * @param {{}} request_arguments JSON payload to send to Veryfi
42
+ * @param params {{}} query params.
43
+ * @param {Boolean} has_files Are there any files to be submitted as binary
44
+ * @returns {JSON} A JSON of the response data.
45
+ */
46
+ public _request(http_verb: String, endpoint_name: String, request_arguments: Object, params: Object, has_files: boolean): Promise<any>;
47
+
48
+
49
+ /**
50
+ * Delete document from Veryfi. https://docs.veryfi.com/api/receipts-invoices/delete-a-document/
51
+ * @memberof Client
52
+ * @param {string} document_id ID of the document you'd like to delete
53
+ * @returns {Promise<VeryfiDocument>} Object of data extracted from the document
54
+ */
55
+ public delete_document(document_id: string): Promise<any>;
56
+
57
+ /**
58
+ * Retrieve document by ID. https://docs.veryfi.com/api/receipts-invoices/get-a-document/
59
+ * @memberof Client
60
+ * @param {string} document_id ID of the document you'd like to retrieve
61
+ * @param {Object} kwargs Additional request parameters
62
+ * @returns {Promise<VeryfiDocument>} Object of data extracted from the document
63
+ */
64
+ public get_document(document_id: string,
65
+ {...kwargs}?: VeryfiExtraArgs): Promise<VeryfiDocument>;
66
+
67
+ /**
68
+ * Get all documents. https://docs.veryfi.com/api/receipts-invoices/search-documents/
69
+ * @memberof Client
70
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
71
+ * @param {number} page_size The number of Documents per page.
72
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
73
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
74
+ * @param {Object} kwargs Additional request parameters
75
+ * @returns {Promise<VeryfiDocument>} Object of previously processed documents
76
+ */
77
+ public get_documents(
78
+ page?: number,
79
+ page_size?: number,
80
+ bounding_boxes?: boolean,
81
+ confidence_details?: boolean,
82
+ {...kwargs}?: VeryfiExtraArgs
83
+ ): Promise<JsonObject>;
84
+
85
+ /**
86
+ * Process a document and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
87
+ * @example
88
+ * veryfi_client.process_document(
89
+ * 'file/path',
90
+ * ['Entertainment', 'Food'],
91
+ * true,
92
+ * { extra: 'parameters' }
93
+ * )
94
+ * @memberof Client
95
+ * @param {string} file_path Path on disk to a file to submit for data extraction
96
+ * @param {string[]} categories List of categories Veryfi can use to categorize the document
97
+ * @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
98
+ * @param {VeryfiExtraArgs} kwargs Additional request parameters
99
+ * @returns {Promise<VeryfiDocument>} Object of data extracted from the document
100
+ */
101
+ public process_document(
102
+ file_path: string,
103
+ categories?: string[],
104
+ auto_delete?: boolean,
105
+ {...kwargs}?: VeryfiExtraArgs
106
+ ): Promise<VeryfiDocument>;
107
+
108
+ /**
109
+ * Process a document and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
110
+ * @example
111
+ * veryfi_client.process_document_from_base64('base64_encoded_string',
112
+ * 'receipt.png',
113
+ * ['Entertainment','Food'],
114
+ * true,
115
+ * {'extra': 'parameters'})
116
+ *
117
+ * @memberof Client
118
+ * @param {String} base64_encoded_string Buffer string of a file to submit for data extraction
119
+ * @param {String} file_name The file name including the extension
120
+ * @param {Array} categories List of categories Veryfi can use to categorize the document
121
+ * @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
122
+ * @param {Object} kwargs Additional request parameters
123
+ * @returns {JSON} Data extracted from the document
124
+ */
125
+ public process_document_from_base64(
126
+ base64_encoded_string: string,
127
+ file_name: string,
128
+ categories?: string[],
129
+ auto_delete?: boolean,
130
+ {...kwargs}?: VeryfiExtraArgs
131
+ ): Promise<VeryfiDocument>;
132
+
133
+ /**
134
+ * Process a document and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
135
+ *
136
+ * @memberof Client
137
+ * @param {fs.ReadStream} file ReadStream of a file to submit for data extraction
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
+ * @param {Boolean} auto_delete Delete this document from Veryfi after data has been extracted
141
+ * @param {Object} kwargs Additional request parameters
142
+ * @returns {JSON} Data extracted from the document
143
+ */
144
+ public process_document_from_stream(
145
+ file: fs.ReadStream,
146
+ file_name: string,
147
+ categories?: string[],
148
+ auto_delete?: boolean,
149
+ {...kwargs}?: VeryfiExtraArgs
150
+ ): Promise<VeryfiDocument>;
151
+
152
+ /**
153
+ * Process document from url and extract all the fields from it. https://docs.veryfi.com/api/receipts-invoices/process-a-document/
154
+ * @memberof Client
155
+ * @param {string} file_url Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. 'https://cdn.example.com/receipt.jpg'.
156
+ * @param {string[]} file_urls Required if file_url isn't specified. List of publicly accessible URLs to multiple files, e.g. ['https://cdn.example.com/receipt1.jpg', 'https://cdn.example.com/receipt2.jpg']
157
+ * @param {string[]} categories List of categories to use when categorizing the document
158
+ * @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
159
+ * @param {boolean} boost_mode Flag that tells Veryfi whether boost mode should be enabled. When set to 1, Veryfi will skip data enrichment steps, but will process the document faster. Default value for this flag is 0
160
+ * @param {string} external_id Optional custom document identifier. Use this if you would like to assign your own ID to documents
161
+ * @param {number} 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.
162
+ * @param {VeryfiExtraArgs} kwargs Additional request parameters
163
+ * @return {Promise<VeryfiDocument>} Object of data extracted from the document
164
+ */
165
+ public process_document_from_url(
166
+ file_url?: string,
167
+ file_urls?: string[],
168
+ categories?: string[],
169
+ auto_delete?: boolean,
170
+ boost_mode?: boolean,
171
+ external_id?: string,
172
+ max_pages_to_process?: number,
173
+ {...kwargs}?: VeryfiExtraArgs
174
+ ): Promise<VeryfiDocument>;
175
+
176
+ /**
177
+ * Update data for a previously processed document, including almost any field like `vendor`, `date`, `notes` etc.
178
+ * https://docs.veryfi.com/api/receipts-invoices/update-a-document/
179
+ * @example
180
+ * veryfi_client.update_document(
181
+ * id,
182
+ * { date: '2021-01-01', notes: 'look what I did' }
183
+ * )
184
+ * @memberof Client
185
+ * @param {string} document_id ID of the document you'd like to update
186
+ * @param {VeryfiExtraArgs} kwargs fields to update
187
+ * @return {Promise<VeryfiDocument>} Object of data extracted from the document with updated fields, if fields are writable. Otherwise, a document with unchanged fields.
188
+ */
189
+ public update_document(
190
+ document_id: string,
191
+ {...kwargs}?: VeryfiExtraArgs
192
+ ): Promise<VeryfiDocument>;
193
+
194
+
195
+ /**
196
+ * Delete any document from Veryfi. https://docs.veryfi.com/api/receipts-invoices/delete-a-document/
197
+ * @memberof Client
198
+ * @param {string} document_id ID of the document you'd like to delete
199
+ * @returns {Promise<any>} Object of data extracted from the document
200
+ */
201
+ public delete_any_document(document_id: string): Promise<any>;
202
+
203
+ /**
204
+ * Get a specific any document. https://docs.veryfi.com/api/anydocs/get-a-%E2%88%80-doc/
205
+ * @memberof Client
206
+ * @param {number} document_id The unique identifier of the document.
207
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
208
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
209
+ * @param {Object} kwargs Additional request parameters
210
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
211
+ */
212
+ public get_any_document(document_id: number,
213
+ bounding_boxes?: boolean,
214
+ confidence_details?: boolean,
215
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject>;
216
+
217
+ /**
218
+ * Get all any documents. https://docs.veryfi.com/api/anydocs/get-%E2%88%80-docs/
219
+ * @memberof Client
220
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
221
+ * @param {number} page_size The number of Documents per page.
222
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
223
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
224
+ * @param {Object} kwargs Additional request parameters
225
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
226
+ */
227
+ public get_any_documents(page?: number,
228
+ page_size?: number,
229
+ bounding_boxes?: boolean,
230
+ confidence_details?: boolean,
231
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject>;
232
+
233
+ /**
234
+ * Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
235
+ * @example
236
+ * veryfi_client.process_any_document('file/path','template_name')
237
+ *
238
+ * @memberof Client
239
+ * @param {String} file_path Path on disk to a file to submit for data extraction
240
+ * @param {String} blueprint_name The name of the extraction blueprints to use.
241
+ * @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
242
+ * @param {Object} kwargs Additional request parameters
243
+ * @returns {JSON} Data extracted from the document
244
+ */
245
+ public process_any_document(
246
+ file_path: string,
247
+ blueprint_name?: string,
248
+ max_pages_to_process?: number,
249
+ {...kwargs}?: VeryfiExtraArgs
250
+ ): Promise<JsonObject>;
251
+
252
+ /**
253
+ * Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
254
+ *
255
+ * @memberof Client
256
+ * @param {ReadStream} file ReadStream of a file to submit for data extraction
257
+ * @param {String} file_name The file name including the extension
258
+ * @param {String} blueprint_name The name of the extraction blueprints to use.
259
+ * @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
260
+ * @param {Object} kwargs Additional request parameters
261
+ * @returns {JSON} Data extracted from the document
262
+ */
263
+ public process_any_document_from_stream(
264
+ file: fs.ReadStream,
265
+ file_name: string,
266
+ blueprint_name?: string,
267
+ max_pages_to_process?: number,
268
+ {...kwargs}?: VeryfiExtraArgs
269
+ ): Promise<JsonObject>;
270
+
271
+ /**
272
+ * Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
273
+ *
274
+ * @memberof Client
275
+ * @param {String} file_name The file name including the extension
276
+ * @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}
277
+ * @param {String} blueprint_name The name of the extraction blueprints to use.
278
+ * @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
279
+ * @param {Object} kwargs Additional request parameters
280
+ * @returns {JSON} Data extracted from the document
281
+ */
282
+ public process_any_document_from_base64(
283
+ file_name: string,
284
+ file_base64_string: string,
285
+ blueprint_name?: string,
286
+ max_pages_to_process?: number,
287
+ {...kwargs}?: VeryfiExtraArgs
288
+ ): Promise<JsonObject>;
289
+
290
+ /**
291
+ * Process any document and extract all the fields from it. https://docs.veryfi.com/api/anydocs/process-%E2%88%80-doc/
292
+ * @example
293
+ * veryfi_client.process_any_document_url('file_url','template_name')
294
+ *
295
+ * @memberof Client
296
+ * @param {String} file_url url file to submit for data extraction
297
+ * @param {String} blueprint_name The name of the extraction blueprints to use.
298
+ * @param {number} max_pages_to_process The number of pages to process for the document. The limit is 50 pages per document.
299
+ * @param {Object} kwargs Additional request parameters
300
+ * @returns {JSON} Data extracted from the document
301
+ */
302
+ public process_any_document_from_url(
303
+ file_url: string,
304
+ blueprint_name?: string,
305
+ max_pages_to_process?: number,
306
+ {...kwargs}?: VeryfiExtraArgs
307
+ ): Promise<JsonObject>;
308
+
309
+ /**
310
+ * Delete bank statement document from Veryfi. https://docs.veryfi.com/api/bank-statements/delete-a-bank-statement/
311
+ * @memberof Client
312
+ * @param {string} document_id ID of the document you'd like to delete
313
+ * @returns {Promise<any>} Object of data extracted from the document
314
+ */
315
+ public delete_bank_statement(document_id: string): Promise<any>;
316
+
317
+ /**
318
+ * Get a specific bank statement. https://docs.veryfi.com/api/bank-statements/get-a-bank-statement/
319
+ * @memberof Client
320
+ * @param {number} document_id The unique identifier of the document.
321
+ * @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
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
323
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
324
+ */
325
+ public get_bank_statement(document_id: number,
326
+ bounding_boxes?: boolean,
327
+ confidence_details?: boolean,
328
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject>;
329
+
330
+ /**
331
+ * Get all bank statements. https://docs.veryfi.com/api/bank-statements/get-bank-statements/
332
+ * @memberof Client
333
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
334
+ * @param {number} page_size The number of Documents per page.
335
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
336
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
337
+ * @param {Object} kwargs Additional request parameters
338
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
339
+ */
340
+ public get_bank_statements(
341
+ page?: number,
342
+ page_size?: number,
343
+ bounding_boxes?: boolean,
344
+ confidence_details?: boolean,
345
+ {...kwargs}?: VeryfiExtraArgs
346
+ ): Promise<JsonObject>;
347
+
348
+ /**
349
+ * Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
350
+ * @example
351
+ * veryfi_client.process_bank_statement('file/path')
352
+ *
353
+ * @memberof Client
354
+ * @param {String} file_path Path on disk to a file to submit for data extraction
355
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
356
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
357
+ * @param {Object} kwargs Additional request parameters
358
+ * @returns {JSON} Data extracted from the document
359
+ */
360
+ public process_bank_statement(
361
+ file_path: string,
362
+ bounding_boxes?: boolean,
363
+ confidence_details?: boolean,
364
+ {...kwargs}?: VeryfiExtraArgs
365
+ ): Promise<JsonObject>;
366
+
367
+ /**
368
+ * Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
369
+ *
370
+ * @memberof Client
371
+ * @param {fs.ReadStream} file file to submit for data extraction
372
+ * @param {String} file_name The file name including the extension
373
+ * @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
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
375
+ * @param {Object} kwargs Additional request parameters
376
+ * @returns {JSON} Data extracted from the document
377
+ */
378
+ public process_bank_statement_from_stream(
379
+ file: fs.ReadStream,
380
+ file_name: string,
381
+ bounding_boxes?: boolean,
382
+ confidence_details?: boolean,
383
+ {...kwargs}?: VeryfiExtraArgs
384
+ ): Promise<JsonObject>;
385
+
386
+ /**
387
+ * Process bank statement and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
388
+ * @example
389
+ * veryfi_client.process_bank_statement('file/path')
390
+ *
391
+ * @memberof Client
392
+ * @param {String} file_name The file name including the extension
393
+ * @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}
394
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
395
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
396
+ * @param {Object} kwargs Additional request parameters
397
+ * @returns {JSON} Data extracted from the document
398
+ */
399
+ public process_bank_statement_from_base64(
400
+ file_name: string,
401
+ file_base64_string: string,
402
+ bounding_boxes?: boolean,
403
+ confidence_details?: boolean,
404
+ {...kwargs}?: VeryfiExtraArgs
405
+ ): Promise<JsonObject>;
406
+
407
+ /**
408
+ * Process bank statement document and extract all the fields from it. https://docs.veryfi.com/api/bank-statements/process-a-bank-statement/
409
+ * @example
410
+ * veryfi_client.process_bank_statement_url('file_url')
411
+ *
412
+ * @memberof Client
413
+ * @param {String} file_url url file to submit for data extraction
414
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
415
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
416
+ * @param {Object} kwargs Additional request parameters
417
+ * @returns {JSON} Data extracted from the document
418
+ */
419
+ public process_bank_statement_from_url(
420
+ file_url: string,
421
+ bounding_boxes?: boolean,
422
+ confidence_details?: boolean,
423
+ {...kwargs}?: VeryfiExtraArgs
424
+ ): Promise<JsonObject>;
425
+
426
+ /**
427
+ * Delete business card document from Veryfi. https://docs.veryfi.com/api/business-cards/delete-a-business-card/
428
+ * @memberof Client
429
+ * @param {string} document_id ID of the document you'd like to delete
430
+ * @returns {Promise<any>} Object of data extracted from the document
431
+ */
432
+ public delete_business_card(document_id: string): Promise<any>;
433
+
434
+ /**
435
+ * Get a specific business card. https://docs.veryfi.com/api/business-cards/get-a-business-card/
436
+ * @memberof Client
437
+ * @param {number} document_id The unique identifier of the document.
438
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
439
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
440
+ * @param {Object} kwargs Additional request parameters
441
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
442
+ */
443
+ public get_business_card(document_id: number,
444
+ bounding_boxes?: boolean,
445
+ confidence_details?: boolean,
446
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject[]>;
447
+
448
+ /**
449
+ * Get all business cards. https://docs.veryfi.com/api/business-cards/get-business-cards/
450
+ * @memberof Client
451
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
452
+ * @param {number} page_size The number of Documents per page.
453
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
454
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
455
+ * @param {Object} kwargs Additional request parameters
456
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
457
+ */
458
+ public get_business_cards(
459
+ page?: number,
460
+ page_size?: number,
461
+ bounding_boxes?: boolean,
462
+ confidence_details?: boolean,
463
+ {...kwargs}?: VeryfiExtraArgs
464
+ ): Promise<JsonObject[]>;
465
+
466
+ /**
467
+ * Process business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
468
+ * @example
469
+ * veryfi_client.process_business_card('file/path')
470
+ *
471
+ * @memberof Client
472
+ * @param {String} file_path Path on disk to a file to submit for data extraction
473
+ * @param {Object} kwargs Additional request parameters
474
+ * @returns {JSON} Data extracted from the document
475
+ */
476
+ public process_business_card(
477
+ file_path: string,
478
+ {...kwargs}?: VeryfiExtraArgs
479
+ ): Promise<JsonObject>;
480
+
481
+ /**
482
+ * Process business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
483
+ *
484
+ * @memberof Client
485
+ * @param {fs.ReadStream} file ReadStream of a file to submit for data extraction
486
+ * @param {String} file_name The file name including the extension
487
+ * @param {Object} kwargs Additional request parameters
488
+ * @returns {JSON} Data extracted from the document
489
+ */
490
+ public process_business_card_from_stream(
491
+ file: fs.ReadStream,
492
+ file_name: string,
493
+ {...kwargs}?: VeryfiExtraArgs
494
+ ): Promise<JsonObject>;
495
+
496
+ /**
497
+ * Process business card and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
498
+ *
499
+ * @memberof Client
500
+ * @param {String} file_name The file name including the extension
501
+ * @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}
502
+ * @param {Object} kwargs Additional request parameters
503
+ * @returns {JSON} Data extracted from the document
504
+ */
505
+ public process_business_card_from_base64(
506
+ file_name: string,
507
+ file_base64_string?: string,
508
+ {...kwargs}?: VeryfiExtraArgs
509
+ ): Promise<JsonObject>;
510
+
511
+ /**
512
+ * Process business card document and extract all the fields from it. https://docs.veryfi.com/api/business-cards/process-a-business-card/
513
+ * @example
514
+ * veryfi_client.process_business_card_url('file_url')
515
+ *
516
+ * @memberof Client
517
+ * @param {String} file_url url file to submit for data extraction
518
+ * @param {Object} kwargs Additional request parameters
519
+ * @returns {JSON} Data extracted from the document
520
+ */
521
+ public process_business_card_from_url(
522
+ file_url: string,
523
+ {...kwargs}?: VeryfiExtraArgs
524
+ ): Promise<JsonObject>;
525
+
526
+
527
+ /**
528
+ * Delete a check document from Veryfi. https://docs.veryfi.com/api/checks/delete-a-check/
529
+ * @memberof Client
530
+ * @param {string} document_id ID of the document you'd like to delete
531
+ * @returns {Promise<any>} Object of data extracted from the document
532
+ */
533
+ public delete_check(document_id: string): Promise<any>;
534
+
535
+ /**
536
+ * Get a specific check. https://docs.veryfi.com/api/checks/get-a-check/
537
+ * @memberof Client
538
+ * @param {number} document_id The unique identifier of the document.
539
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
540
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
541
+ * @param {Object} kwargs Additional request parameters.
542
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
543
+ */
544
+ public get_check(document_id: number,
545
+ bounding_boxes?: boolean,
546
+ confidence_details?: boolean,
547
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject[]>;
548
+
549
+ /**
550
+ * Get all checks. https://docs.veryfi.com/api/checks/get-checks/
551
+ * @memberof Client
552
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
553
+ * @param {number} page_size The number of Documents per page.
554
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
555
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
556
+ * @param {Object} kwargs Additional request parameters.
557
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
558
+ */
559
+ public get_checks(
560
+ page?: number,
561
+ page_size?: number,
562
+ bounding_boxes?: boolean,
563
+ confidence_details?: boolean,
564
+ {...kwargs}?: VeryfiExtraArgs
565
+ ): Promise<JsonObject[]>;
566
+
567
+ /**
568
+ * Process check and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
569
+ * @example
570
+ * veryfi_client.process_check('file/path')
571
+ *
572
+ * @memberof Client
573
+ * @param {String} file_path Path on disk to a file to submit for data extraction
574
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
575
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
576
+ * @param {Object} kwargs Additional request parameters
577
+ * @returns {JSON} Data extracted from the document
578
+ */
579
+ public process_check(
580
+ file_path: string,
581
+ bounding_boxes?: boolean,
582
+ confidence_details?: boolean,
583
+ {...kwargs}?: VeryfiExtraArgs
584
+ ): Promise<JsonObject>;
585
+
586
+ /**
587
+ * Process check and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
588
+ *
589
+ * @memberof Client
590
+ * @param {String} file_name The file name including the extension
591
+ * @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}
592
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
593
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
594
+ * @param {Object} kwargs Additional request parameters
595
+ * @returns {JSON} Data extracted from the document
596
+ */
597
+ public process_check_from_base64(
598
+ file_name: string,
599
+ file_base64_string: string,
600
+ bounding_boxes?: boolean,
601
+ confidence_details?: boolean,
602
+ {...kwargs}?: VeryfiExtraArgs
603
+ ): Promise<JsonObject>;
604
+
605
+ /**
606
+ * Process check and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
607
+ *
608
+ * @memberof Client
609
+ * @param {fs.ReadStream} file file to submit for data extraction
610
+ * @param {String} file_name The file name including the extension
611
+ * @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
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
613
+ * @param {Object} kwargs Additional request parameters
614
+ * @returns {JSON} Data extracted from the document
615
+ */
616
+ public process_check_from_stream(
617
+ file: fs.ReadStream,
618
+ file_name: string,
619
+ bounding_boxes?: boolean,
620
+ confidence_details?: boolean,
621
+ {...kwargs}?: VeryfiExtraArgs
622
+ ): Promise<JsonObject>;
623
+
624
+ /**
625
+ * Process a check document and extract all the fields from it. https://docs.veryfi.com/api/checks/process-a-check/
626
+ * @example
627
+ * veryfi_client.process_check_url('file_url')
628
+ *
629
+ * @memberof Client
630
+ * @param {String} file_url url file to submit for data extraction
631
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
632
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
633
+ * @param {Object} kwargs Additional request parameters
634
+ * @returns {JSON} Data extracted from the document
635
+ */
636
+ public process_check_from_url(
637
+ file_url: string,
638
+ bounding_boxes?: boolean,
639
+ confidence_details?: boolean,
640
+ {...kwargs}?: VeryfiExtraArgs
641
+ ): Promise<JsonObject>;
642
+
643
+ /**
644
+ * Delete w2 document from Veryfi. https://docs.veryfi.com/api/w2s/delete-a-w2/
645
+ * @memberof Client
646
+ * @param {string} document_id ID of the document you'd like to delete
647
+ * @returns {Promise<any>} Object of data extracted from the document
648
+ */
649
+ public delete_w2(document_id: string): Promise<any>;
650
+
651
+ /**
652
+ * Get a specific w2. https://docs.veryfi.com/api/w2s/get-a-w-2/
653
+ * @memberof Client
654
+ * @param {number} document_id The unique identifier of the document.
655
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
656
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
657
+ * @param {Object} kwargs Additional request parameters.
658
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
659
+ */
660
+ public get_w2(document_id: number,
661
+ bounding_boxes?: boolean,
662
+ confidence_details?: boolean,
663
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject[]>;
664
+
665
+ /**
666
+ * Get all w2s. https://docs.veryfi.com/api/w2s/get-w-2-s/
667
+ * @memberof Client
668
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
669
+ * @param {number} page_size The number of Documents per page.
670
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
671
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
672
+ * @param {Object} kwargs Additional request parameters.
673
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
674
+ */
675
+ public get_w2s(
676
+ page?: number,
677
+ page_size?: number,
678
+ bounding_boxes?: boolean,
679
+ confidence_details?: boolean,
680
+ {...kwargs}?: VeryfiExtraArgs
681
+ ): Promise<JsonObject[]>;
682
+
683
+ /**
684
+ * Process w2 and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
685
+ * @example
686
+ * veryfi_client.process_w2('file/path')
687
+ *
688
+ * @memberof Client
689
+ * @param {String} file_path Path on disk to a file to submit for data extraction
690
+ * @param {boolean} delete_after_processing Delete this document from Veryfi after data has been extracted
691
+ * @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.
692
+ * @param {Object} kwargs Additional request parameters
693
+ * @returns {JSON} Data extracted from the document
694
+ */
695
+ public process_w2(
696
+ file_path: string,
697
+ delete_after_processing?: boolean,
698
+ max_pages_to_process?: number,
699
+ {...kwargs}?: VeryfiExtraArgs
700
+ ): Promise<JsonObject>;
701
+
702
+ /**
703
+ * Process w2 and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
704
+ *
705
+ * @memberof Client
706
+ * @param {fs.ReadStream} file file to submit for data extraction
707
+ * @param {String} file_name The file name including the extension
708
+ * @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
709
+ * @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.
710
+ * @param {Object} kwargs Additional request parameters
711
+ * @returns {JSON} Data extracted from the document
712
+ */
713
+ public process_w2_from_stream(
714
+ file: fs.ReadStream,
715
+ file_name: string,
716
+ auto_delete?: boolean,
717
+ max_pages_to_process?: number,
718
+ {...kwargs}?: VeryfiExtraArgs
719
+ ): Promise<JsonObject>;
720
+
721
+ /**
722
+ * Process w2 and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
723
+ * @example
724
+ * veryfi_client.process_w2_from_base64('file/path')
725
+ *
726
+ * @memberof Client
727
+ * @param {String} file_name The file name including the extension
728
+ * @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}
729
+ * @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
730
+ * @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.
731
+ * @param {Object} kwargs Additional request parameters
732
+ * @returns {JSON} Data extracted from the document
733
+ */
734
+ public process_w2_from_base64(
735
+ file_name: string,
736
+ file_base64_string?: string,
737
+ auto_delete?: boolean,
738
+ max_pages_to_process?: number,
739
+ {...kwargs}?: VeryfiExtraArgs
740
+ ): Promise<JsonObject>;
741
+
742
+ /**
743
+ * Process w2 document and extract all the fields from it. https://docs.veryfi.com/api/w2s/process-a-w-2/
744
+ * @example
745
+ * veryfi_client.process_w2_url('file_url')
746
+ *
747
+ * @memberof Client
748
+ * @param {String} file_name The file name including the extension
749
+ * @param {string} file_url Required if file_urls isn't specified. Publicly accessible URL to a file, e.g. "https://cdn.example.com/receipt.jpg".
750
+ * @param {Array} file_urls Required if file_url isn't specified. List of publicly accessible URLs to multiple files, e.g. ["https://cdn.example.com/receipt1.jpg", "https://cdn.example.com/receipt2.jpg"]
751
+ * @param {boolean} auto_delete Delete this document from Veryfi after data has been extracted
752
+ * @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.
753
+ * @param {Object} kwargs Additional request parameters
754
+ * @returns {JsonObject} Data extracted from the document
755
+ */
756
+ public process_w2_from_url(
757
+ file_name: string,
758
+ file_url: string,
759
+ file_urls?: string[],
760
+ auto_delete?: boolean,
761
+ max_pages_to_process?: number,
762
+ {...kwargs}?: VeryfiExtraArgs
763
+ ): Promise<JsonObject>;
764
+
765
+
766
+ /**
767
+ * Delete W-8BEN-E document from Veryfi. https://docs.veryfi.com/api/w-8ben-e/delete-a-w-8-ben-e/
768
+ * @memberof Client
769
+ * @param {string} document_id ID of the document you'd like to delete
770
+ * @returns {Promise<any>} Object of data extracted from the document
771
+ */
772
+ public delete_w8bene(document_id: string): Promise<any>;
773
+
774
+ /**
775
+ * Get a specific W-8BEN-E. https://docs.veryfi.com/api/w-8ben-e/get-a-w-8-ben-e/
776
+ * @memberof Client
777
+ * @param {number} document_id The unique identifier of the document.
778
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
779
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
780
+ * @param {Object} kwargs Additional request parameters.
781
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
782
+ */
783
+ public get_w8bene(document_id: number,
784
+ bounding_boxes?: boolean,
785
+ confidence_details?: boolean,
786
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject[]>;
787
+
788
+ /**
789
+ * Get all W-8BEN-E. https://docs.veryfi.com/api/w-8ben-e/get-w-8-ben-es/
790
+ * @memberof Client
791
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
792
+ * @param {number} page_size The number of Documents per page.
793
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
794
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
795
+ * @param {Object} kwargs Additional request parameters.
796
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
797
+ */
798
+ public get_w8benes(
799
+ page?: number,
800
+ page_size?: number,
801
+ bounding_boxes?: boolean,
802
+ confidence_details?: boolean,
803
+ {...kwargs}?: VeryfiExtraArgs
804
+ ): Promise<JsonObject[]>;
805
+
806
+ /**
807
+ * 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/
808
+ * @example
809
+ * veryfi_client.process_w8bene('file/path')
810
+ *
811
+ * @memberof Client
812
+ * @param {String} file_path Path on disk to a file to submit for data extraction
813
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
814
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
815
+ * @param {Object} kwargs Additional request parameters
816
+ * @returns {JSON} Data extracted from the document
817
+ */
818
+ public process_w8bene(
819
+ file_path: string,
820
+ bounding_boxes?: boolean,
821
+ confidence_details?: boolean,
822
+ {...kwargs}?: VeryfiExtraArgs
823
+ ): Promise<JsonObject>;
824
+
825
+ /**
826
+ * 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
+ *
828
+ * @memberof Client
829
+ * @param {fs.ReadStream} file file to submit for data extraction
830
+ * @param {String} file_name The file name including the extension.
831
+ * @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
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
833
+ * @param {Object} kwargs Additional request parameters
834
+ * @returns {JSON} Data extracted from the document
835
+ */
836
+ public process_w8bene_from_stream(
837
+ file: fs.ReadStream,
838
+ file_name: string,
839
+ bounding_boxes?: boolean,
840
+ confidence_details?: boolean,
841
+ {...kwargs}?: VeryfiExtraArgs
842
+ ): Promise<JsonObject>;
843
+
844
+ /**
845
+ * 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/
846
+ *
847
+ * @memberof Client
848
+ * @param {String} file_name The file name including the extension.
849
+ * @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}.
850
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
851
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
852
+ * @param {Object} kwargs Additional request parameters
853
+ * @returns {JSON} Data extracted from the document
854
+ */
855
+ public process_w8bene_from_base64(
856
+ file_name: string,
857
+ file_base64_string: string,
858
+ bounding_boxes?: boolean,
859
+ confidence_details?: boolean,
860
+ {...kwargs}?: VeryfiExtraArgs
861
+ ): Promise<JsonObject>;
862
+
863
+ /**
864
+ * Process W-8BEN-E document and extract all the fields from it. https://docs.veryfi.com/api/w-8ben-e/process-a-w-8-ben-e/
865
+ * @example
866
+ * veryfi_client.process_w8bene_from_url('file_url')
867
+ *
868
+ * @memberof Client
869
+ * @param {String} file_url url file to submit for data extraction
870
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
871
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
872
+ * @param {Object} kwargs Additional request parameters
873
+ * @returns {JSON} Data extracted from the document
874
+ */
875
+ public process_w8bene_from_url(
876
+ file_url: string,
877
+ bounding_boxes?: boolean,
878
+ confidence_details?: boolean,
879
+ {...kwargs}?: VeryfiExtraArgs
880
+ ): Promise<JsonObject>;
881
+
882
+
883
+ /**
884
+ * Delete W9 document from Veryfi. https://docs.veryfi.com/api/w9s/delete-a-w-9/
885
+ * @memberof Client
886
+ * @param {string} document_id ID of the document you'd like to delete
887
+ * @returns {Promise<any>} Object of data extracted from the document
888
+ */
889
+ public delete_w9(document_id: string): Promise<any>;
890
+
891
+ /**
892
+ * Get a specific w9. https://docs.veryfi.com/api/w9s/get-a-w-9/
893
+ * @memberof Client
894
+ * @param {number} document_id The unique identifier of the document.
895
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
896
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
897
+ * @param {Object} kwargs Additional request parameters.
898
+ * @returns {Promise<JsonObject>} Object of a previously processed blueprinted document.
899
+ */
900
+ public get_w9(document_id: number,
901
+ bounding_boxes?: boolean,
902
+ confidence_details?: boolean,
903
+ {...kwargs}?: VeryfiExtraArgs): Promise<JsonObject[]>;
904
+
905
+ /**
906
+ * Get all w9s. https://docs.veryfi.com/api/w9s/get-w-9-s/
907
+ * @memberof Client
908
+ * @param {number} page The page number. The response is capped to maximum of 50 results per page.
909
+ * @param {number} page_size The number of Documents per page.
910
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
911
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
912
+ * @param {Object} kwargs Additional request parameters.
913
+ * @returns {Promise<JsonObject>} Object of previously processed any documents
914
+ */
915
+ public get_w9s(
916
+ page?: number,
917
+ page_size?: number,
918
+ bounding_boxes?: boolean,
919
+ confidence_details?: boolean,
920
+ {...kwargs}?: VeryfiExtraArgs
921
+ ): Promise<JsonObject[]>;
922
+
923
+ /**
924
+ * Process w9 and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
925
+ * @example
926
+ * veryfi_client.process_w9('file/path')
927
+ *
928
+ * @memberof Client
929
+ * @param {String} file_path Path on disk to a file to submit for data extraction
930
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
931
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
932
+ * @param {Object} kwargs Additional request parameters
933
+ * @returns {JSON} Data extracted from the document
934
+ */
935
+ public process_w9(
936
+ file_path: string,
937
+ bounding_boxes?: boolean,
938
+ confidence_details?: boolean,
939
+ {...kwargs}?: VeryfiExtraArgs
940
+ ): Promise<JsonObject>;
941
+
942
+ /**
943
+ * Process w9 and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
944
+ *
945
+ * @memberof Client
946
+ * @param {fs.ReadStream} file file to submit for data extraction
947
+ * @param {String} file_name The file name including the extension.
948
+ * @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
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
950
+ * @param {Object} kwargs Additional request parameters
951
+ * @returns {JSON} Data extracted from the document
952
+ */
953
+ public process_w9_from_stream(
954
+ file: fs.ReadStream,
955
+ file_name: string,
956
+ bounding_boxes?: boolean,
957
+ confidence_details?: boolean,
958
+ {...kwargs}?: VeryfiExtraArgs
959
+ ): Promise<JsonObject>;
960
+
961
+ /**
962
+ * Process w9 and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
963
+ * @example
964
+ * veryfi_client.process_w9_from_base64('file/path')
965
+ *
966
+ * @memberof Client
967
+ * @param {String} file_name The file name including the extension.
968
+ * @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}.
969
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
970
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
971
+ * @param {Object} kwargs Additional request parameters
972
+ * @returns {JSON} Data extracted from the document
973
+ */
974
+ public process_w9_from_base64(
975
+ file_name: string,
976
+ file_base64_string: string,
977
+ bounding_boxes?: boolean,
978
+ confidence_details?: boolean,
979
+ {...kwargs}?: VeryfiExtraArgs
980
+ ): Promise<JsonObject>;
981
+
982
+ /**
983
+ * Process w9 document and extract all the fields from it. https://docs.veryfi.com/api/w9s/process-a-w-9/
984
+ * @example
985
+ * veryfi_client.process_w9_url('file_url')
986
+ *
987
+ * @memberof Client
988
+ * @param {String} file_url url file to submit for data extraction
989
+ * @param {boolean} bounding_boxes A field used to determine whether to return bounding_box and bounding_region for extracted fields in the Document response.
990
+ * @param {boolean} confidence_details A field used to determine whether to return the score and ocr_score fields in the Document response.
991
+ * @param {Object} kwargs Additional request parameters
992
+ * @returns {JSON} Data extracted from the document
993
+ */
994
+ public process_w9_from_url(
995
+ file_url: string,
996
+ bounding_boxes?: boolean,
997
+ confidence_details?: boolean,
998
+ {...kwargs}?: VeryfiExtraArgs
999
+ ): Promise<JsonObject>;
1000
+
1001
+
1002
+ /**
1003
+ * Add a new tag on an existing document. https://docs.veryfi.com/api/receipts-invoices/add-a-tag-to-a-document/
1004
+ *
1005
+ * @param {number} document_id ID of the document you'd like to add a Tag
1006
+ * @param {string} tag name to add
1007
+ * @return {Promise<Tag>} response about tag added.
1008
+ */
1009
+ public add_tag(document_id: string, tag: string): Promise<Tag>;
1010
+
1011
+ /**
1012
+ * Delete all tags on an existing document. https://docs.veryfi.com/api/receipts-invoices/unlink-all-tags-from-a-document/
1013
+ *
1014
+ * @param {number} document_id ID of the document you'd like to delete all Tags
1015
+ * @return {Promise<any>} response about deleted tags.
1016
+ */
1017
+ public delete_tags(document_id: string): Promise<any>;
1018
+
1019
+ /**
1020
+ * Add multiple tags on an existing document. https://docs.veryfi.com/api/receipts-invoices/add-tags-to-a-document/
1021
+ *
1022
+ * @param {number} document_id ID of the document you'd like to add a Tag
1023
+ * @param {string[]} tags name to add
1024
+ * @return {Promise<Tag>} response about tags added.
1025
+ */
1026
+ public add_tags(document_id: string, tags: string[]): Promise<Tag>;
1027
+
1028
+ /**
1029
+ * Replace multiple tags on an existing document. https://docs.veryfi.com/api/receipts-invoices/add-tags-to-a-document/
1030
+ *
1031
+ * @param {number} document_id ID of the document you'd like to add a Tag
1032
+ * @param {string[]} tags names to be added
1033
+ * @return {Promise<Tag>} response about tags added.
1034
+ */
1035
+ public replace_tags(document_id: string, tags: string[]): Promise<Tag>;
1036
+
1037
+ }
1038
+
1039
+ /**
1040
+ * Create instance of a Client
1041
+ * @class
1042
+ * @param {string} client_id Your Veryfi client id
1043
+ * @param {string | undefined} client_secret Your Veryfi client secret
1044
+ * @param {string} username Your Veryfi username
1045
+ * @param {string} api_key Your Veryfi API key
1046
+ * @param {string} base_url
1047
+ * @param {number} timeout
1048
+ */
1049
+ export declare function Client(
1050
+ client_id: string,
1051
+ client_secret: string | undefined,
1052
+ username: string,
1053
+ api_key: string,
1054
+ base_url?: string,
1055
+ timeout?: number
1056
+ ): Client;
1057
+
1058
+ export default Client;