@veryfi/veryfi-sdk 1.4.6 → 1.4.8
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/client/client.js +1 -0
- package/lib/client/getHeaders.js +1 -1
- package/lib/documents/tags/deleteTag.js +13 -0
- package/lib/types/Client.ts +10 -0
- package/package.json +14 -11
package/lib/client/client.js
CHANGED
|
@@ -39,6 +39,7 @@ require('../documents/processDocumentUrl');
|
|
|
39
39
|
require('../documents/updateDocument');
|
|
40
40
|
require('../documents/tags/addTags');
|
|
41
41
|
require('../documents/tags/addTag');
|
|
42
|
+
require('../documents/tags/deleteTag');
|
|
42
43
|
require('../documents/tags/deleteTags');
|
|
43
44
|
require('../documents/tags/replaceTags');
|
|
44
45
|
require('../split/splitDocumentBase64');
|
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.8",
|
|
12
12
|
"Accept": "application/json",
|
|
13
13
|
"Content-Type": "application/json",
|
|
14
14
|
"Client-Id": this.client_id,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const Client = require('../../client/constructor');
|
|
2
|
+
/**
|
|
3
|
+
* Unlink a tag from a document. https://docs.veryfi.com/api/receipts-invoices/unlink-a-tag-from-a-document/
|
|
4
|
+
*
|
|
5
|
+
* @param {string} document_id ID of the document you'd like to unlink the tag from
|
|
6
|
+
* @param {string} tag_id ID of the tag you'd like to unlink
|
|
7
|
+
* @return {JSON} response about the unlinked tag.
|
|
8
|
+
*/
|
|
9
|
+
Client.prototype.delete_tag = async function (document_id, tag_id) {
|
|
10
|
+
let endpoint_name = `/documents/${document_id}/tags/${tag_id}/`;
|
|
11
|
+
let request_arguments = {};
|
|
12
|
+
return this._request("DELETE", endpoint_name, request_arguments);
|
|
13
|
+
}
|
package/lib/types/Client.ts
CHANGED
|
@@ -1104,6 +1104,16 @@ export declare class Client {
|
|
|
1104
1104
|
*/
|
|
1105
1105
|
public delete_tags(document_id: string): Promise<any>;
|
|
1106
1106
|
|
|
1107
|
+
/**
|
|
1108
|
+
* Unlink a tag from a document. https://docs.veryfi.com/api/receipts-invoices/unlink-a-tag-from-a-document/
|
|
1109
|
+
*
|
|
1110
|
+
* @memberof Client
|
|
1111
|
+
* @param {string} document_id ID of the document you'd like to unlink the tag from
|
|
1112
|
+
* @param {string} tag_id ID of the tag you'd like to unlink
|
|
1113
|
+
* @return {Promise<any>} response about the unlinked tag.
|
|
1114
|
+
*/
|
|
1115
|
+
public delete_tag(document_id: string, tag_id: string): Promise<any>;
|
|
1116
|
+
|
|
1107
1117
|
/**
|
|
1108
1118
|
* Add multiple tags on an existing document. https://docs.veryfi.com/api/receipts-invoices/add-tags-to-a-document/
|
|
1109
1119
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfi/veryfi-sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "Node.js module for communicating with the Veryfi OCR API",
|
|
5
5
|
"main": "lib/client/client.js",
|
|
6
6
|
"typings": "lib/types/Client.ts",
|
|
@@ -25,22 +25,25 @@
|
|
|
25
25
|
"test": "test"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"jest": "^
|
|
29
|
-
"jsdoc": "^4.0.
|
|
28
|
+
"jest": "^30.4.2",
|
|
29
|
+
"jsdoc": "^4.0.5",
|
|
30
30
|
"minami": "^1.2.3",
|
|
31
|
-
"ts-jest": "^29.
|
|
32
|
-
"typescript": "^
|
|
31
|
+
"ts-jest": "^29.4.12",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@jest/globals": "^
|
|
36
|
-
"axios": "^1.
|
|
37
|
-
"docdash": "^
|
|
38
|
-
"form-data": "^4.0.
|
|
39
|
-
"jest-config": "^
|
|
35
|
+
"@jest/globals": "^30.4.1",
|
|
36
|
+
"axios": "^1.19.0",
|
|
37
|
+
"docdash": "^2.0.2",
|
|
38
|
+
"form-data": "^4.0.6",
|
|
39
|
+
"jest-config": "^30.4.2"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "
|
|
43
|
+
"url": "https://github.com/veryfi/veryfi-nodejs"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
44
47
|
},
|
|
45
48
|
"keywords": [
|
|
46
49
|
"nodejs",
|