diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e76d3..a463358 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ + ## 1.2.11 (April 21, 2023) * Add json-bigint library diff --git a/component.json b/component.json index b336b6d..69750b9 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { - "title": "Node.js Code", - "version": "1.2.11", + "title": "Node.js Code(ThatAPP)", + "version": "1.3.4", "description": "You can write your own code and deploy it as part of integration process.", "docsUrl": "http://go2.elastic.io/code-component", "fields": { diff --git a/package-lock.json b/package-lock.json index deebe60..0fe870e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5873,4 +5873,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 79e9d2d..c6dbca0 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,26 @@ "author": "elastic.io GmbH", "license": "BSD-2-Clause", "dependencies": { + "@sentry/node": "^7.54.0", + "@sentry/tracing": "^7.54.0", + "axios": "^1.4.0", "co": "4.6.0", "co-request": "1.0.0", + "dateformat": "^3.0.3", "elasticio-node": "0.0.9", + "json-beautify": "^1.1.1", + "jsonata": "^1.8.4", + "moment-timezone": "^0.5.33", + "mongodb": "^4.13.0", + "nodejs-base64": "^2.0.0", + "oauth-1.0a": "^2.2.6", + "tedious": "^14.6.0", + "uuid": "^8.3.2", + "xml-writer": "^1.7.0", + "xml2js": "^0.4.23", "elasticio-sailor-nodejs": "2.7.1", "json-bigint": "1.0.0" + }, "devDependencies": { "@elastic.io/component-logger": "0.0.1", diff --git a/test/fixture.json b/test/fixture.json new file mode 100644 index 0000000..4b3c6e9 --- /dev/null +++ b/test/fixture.json @@ -0,0 +1,167 @@ +{ + "fixtures":{ + "code":{ + "msg":{ + "oauth": { + "access_token": "d0a02fa8421442c1a584359d5c416dda", + "token_type": "bearer", + "refresh_token": "d53b599ec18f4098bce11def7289d92b" + }, + "headers":{}, + "body":{ + "appId" : 22758086 + } + }, + "cfg": { + "appId" : 22758086, + "oauth": { + "access_token": "d0a02fa8421442c1a584359d5c416dda", + "token_type": "bearer", + "refresh_token": "d53b599ec18f4098bce11def7289d92b" + } + } + }, + "hooks":{ + "msg":{ + "oauth": { + "access_token": "b4129822bf5a45dd814de90735553eb7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + }, + "headers":{}, + "body":{ + "ItemId" : 980503737 + } + }, + "cfg": { + "ItemId" : 980503737, + "url": "http://google.com", + "hook_type": ["item.update","item.create"], + "hookType": "app", + "ref_id": 21738954, + "oauth": { + "access_token": "b4129822bf5a45dd814de90735553eb7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + } + } + }, + "apps":{ + "msg":{ + "headers":{}, + "body":{ + "AppId" : 21727299 + } + }, + "cfg": { + "AppId" : 21727299 + } + }, + "spaces":{ + "msg":{ + "headers":{}, + "body":{ + "SpaceId" : 6269904 + } + }, + "cfg": { + "SpaceId" : 6269904 + } + }, + "files":{ + "msg":{ + "headers":{}, + "body":{ + "FileId" : 988492515 + } + }, + "cfg": { + "FileId" : 988492515 + } + }, + "comments":{ + "msg":{ + "headers":{}, + "body":{ + "CommentId" : 988492515 + } + }, + "cfg": { + "CommentId" : 988492515 + } + }, + "tasks":{ + "msg":{ + "headers":{}, + "body":{ + "taskId" : 988492515 + } + }, + "cfg": { + "taskId" : 988492515 + } + }, + "updateItem":{ + "msg":{ + "oauth": { + "access_token": "b4129822bf5a45dd814de90735553eb7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + }, + "headers":{}, + "body": { + "appId" : 21732468, + "password":"eiusmod", + "username":"ex do", + "platform":"ipsum do", + "item_id":"1298870607", + "query" : "update" + } + }, + "cfg": { + "oauth": { + "access_token": "b4129822bf5a45dd814de90735553eb7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + }, + "appId" : 21732468, + "password":"eiusmod", + "username":"ex do", + "platform":"ipsum do", + "item_id":"1298870607", + "query" : "update" + } + }, + "getItemsbyApp":{ + "msg":{ + "oauth": { + "access_token": "1cd547105db34387a0a2d93a8ca033e7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + }, + "headers":{}, + "body": { + "appId" : 21738954, + "password":"eiusmod", + "username":"ex do", + "platform":"ipsum do", + "item_id":"1298870607", + "query" : "update" + } + }, + "cfg": { + "oauth": { + "access_token": "1cd547105db34387a0a2d93a8ca033e7", + "token_type": "bearer", + "refresh_token": "60fb6420b41d4ac4a1f97ee327e31523" + }, + "appId" : 21738954, + "password":"eiusmod", + "username":"ex do", + "platform":"ipsum do", + "item_id":"1298870607", + "query" : "update" + } + } + } +}