cloudrail-si
Advanced tools
Comparing version 2.13.0 to 2.14.0
# CloudRail SI Node.JS SDK changelog | ||
* **2.14.0** | ||
* Added a new function to make supported raw HTTP requests to the services implementing Cloud Storage (advanced request) | ||
* **2.13.0** | ||
@@ -4,0 +7,0 @@ * Added functions to post pictures and videos to a user's wall to the Social interface, Facebook and Twitter have been extended accordingly |
@@ -13,2 +13,3 @@ "use strict"; | ||
var DetailErrors_1 = require("../errors/DetailErrors"); | ||
exports.httpMethods = ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "TRACE"]; | ||
var CaseProxy = (function () { | ||
@@ -15,0 +16,0 @@ function CaseProxy(obj) { |
@@ -48,2 +48,4 @@ "use strict"; | ||
var GoogleCloudPlatform_1 = require("./services/GoogleCloudPlatform"); | ||
var AdvancedRequestSpecification_1 = require("./types/AdvancedRequestSpecification"); | ||
var AdvancedRequestResponse_1 = require("./types/AdvancedRequestResponse"); | ||
module.exports = { | ||
@@ -96,3 +98,5 @@ "services": { | ||
"Bucket": Bucket_1.Bucket, | ||
"BusinessFileMetaData": BusinessFileMetaData_1.BusinessFileMetaData | ||
"BusinessFileMetaData": BusinessFileMetaData_1.BusinessFileMetaData, | ||
"AdvancedRequestSpecification": AdvancedRequestSpecification_1.AdvancedRequestSpecification, | ||
"AdvancedRequestResponse": AdvancedRequestResponse_1.AdvancedRequestResponse | ||
}, | ||
@@ -99,0 +103,0 @@ "Settings": Settings_1.Settings, |
@@ -45,3 +45,3 @@ { | ||
"engineStrict": true, | ||
"version": "2.13.0", | ||
"version": "2.14.0", | ||
"main": "index.js", | ||
@@ -48,0 +48,0 @@ "typings": "index.d.ts", |
@@ -36,3 +36,3 @@ <p align="center"> | ||
Business Cloud Storage | Amazon S3, Microsoft Azure, Google Cloud Services, Rackspace, Backblaze | ||
Social Profile | Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Instagram | ||
Social Profile | Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Instagram, Heroku | ||
Social Interaction | Facebook, Twitter | ||
@@ -137,2 +137,3 @@ Payment | PayPal, Stripe | ||
* Heroku | ||
@@ -139,0 +140,0 @@ #### Features |
@@ -382,2 +382,22 @@ "use strict"; | ||
], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["set", "$L0.url", "https://api.box.com/2.0"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["if!=than", "$P2.appendAuthorization", 0, 2], | ||
["callFunc", "checkAuthentication", "$P0"], | ||
["string.concat", "$L0.requestHeaders.Authorization", "Bearer ", "$S0.access_token"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "checkHttpErrors", "$P0", "$L1", "advanced request", 200], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"checkAuthentication": [ | ||
@@ -850,2 +870,17 @@ ["create", "$L0", "Date"], | ||
}; | ||
Box.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("Box", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
Box.prototype.saveAsString = function () { | ||
@@ -852,0 +887,0 @@ Statistics_1.Statistics.addCall("Box", "saveAsString"); |
@@ -294,2 +294,22 @@ "use strict"; | ||
], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["set", "$L0.url", "https://api.dropboxapi.com/2"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["if!=than", "$P2.appendAuthorization", 0, 2], | ||
["callFunc", "checkAuthentication", "$P0"], | ||
["string.concat", "$L0.requestHeaders.Authorization", "Bearer ", "$S0.access_token"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "validateResponse", "$P0", "$L1"], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"checkAuthentication": [ | ||
@@ -821,2 +841,17 @@ ["if!=than", null, "$S0.access_token", 1], | ||
}; | ||
Dropbox.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("Dropbox", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
Dropbox.prototype.saveAsString = function () { | ||
@@ -823,0 +858,0 @@ Statistics_1.Statistics.addCall("Dropbox", "saveAsString"); |
@@ -243,2 +243,22 @@ "use strict"; | ||
"CloudStorage:getThumbnail": [], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["string.concat", "$L0.url", "https://", "$P0.domain", ".egnyte.com"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["if!=than", "$P2.appendAuthorization", 0, 2], | ||
["callFunc", "checkAuthentication", "$P0"], | ||
["string.concat", "$L0.requestHeaders.Authorization", "Bearer ", "$S0.access_token"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "validateResponse", "$P0", "$L1"], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"checkAuthentication": [ | ||
@@ -694,2 +714,17 @@ ["if!=than", null, "$S0.access_token", 1], | ||
}; | ||
Egnyte.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("Egnyte", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
Egnyte.prototype.saveAsString = function () { | ||
@@ -696,0 +731,0 @@ Statistics_1.Statistics.addCall("Egnyte", "saveAsString"); |
@@ -548,2 +548,22 @@ "use strict"; | ||
], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["set", "$L0.url", "https://www.googleapis.com/drive/v3"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["if!=than", "$P2.appendAuthorization", 0, 2], | ||
["callFunc", "checkAuthentication", "$P0"], | ||
["string.concat", "$L0.requestHeaders.Authorization", "Bearer ", "$S0.accessToken"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "validateResponse", "$P0", "$L1"], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"resolvePath": [ | ||
@@ -1256,2 +1276,17 @@ ["if==than", "$P2", "/", 2], | ||
}; | ||
GoogleDrive.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("GoogleDrive", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
GoogleDrive.prototype.saveAsString = function () { | ||
@@ -1258,0 +1293,0 @@ Statistics_1.Statistics.addCall("GoogleDrive", "saveAsString"); |
@@ -452,2 +452,26 @@ "use strict"; | ||
], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["set", "$L0.url", "https://api.onedrive.com/v1.0"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["if!=than", "$P2.appendAuthorization", 0, 6], | ||
["callFunc", "checkAuth", "$P0"], | ||
["string.indexOf", "$L2", "$P2.url", "?"], | ||
["if==than", "$L2", -1, 2], | ||
["string.concat", "$L0.url", "$L0.url", "?access_token=", "$S0.accessToken"], | ||
["jumpRel", 1], | ||
["string.concat", "$L0.url", "$L0.url", "&access_token=", "$S0.accessToken"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "validateResponse", "$P0", "$L1"], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"getParentPath": [ | ||
@@ -992,2 +1016,17 @@ ["create", "$L0", "Number"], | ||
}; | ||
OneDrive.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("OneDrive", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
OneDrive.prototype.saveAsString = function () { | ||
@@ -994,0 +1033,0 @@ Statistics_1.Statistics.addCall("OneDrive", "saveAsString"); |
@@ -423,2 +423,28 @@ "use strict"; | ||
], | ||
"AdvancedRequestSupporter:advancedRequest": [ | ||
["create", "$L0", "Object"], | ||
["create", "$L0.url", "String"], | ||
["if!=than", "$P2.appendAuthorization", 0, 10], | ||
["callFunc", "checkAuth", "$P0"], | ||
["if!=than", "$P2.appendBaseUrl", 0, 1], | ||
["set", "$L0.url", "$S0.url"], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["string.indexOf", "$L2", "$P2.url", "?"], | ||
["if==than", "$L2", -1, 2], | ||
["string.concat", "$L0.url", "$L0.url", "?access_token=", "$S0.accessToken"], | ||
["jumpRel", 1], | ||
["string.concat", "$L0.url", "$L0.url", "&access_token=", "$S0.accessToken"], | ||
["jumpRel", 1], | ||
["string.concat", "$L0.url", "$L0.url", "$P2.url"], | ||
["set", "$L0.requestHeaders", "$P2.headers"], | ||
["set", "$L0.method", "$P2.method"], | ||
["set", "$L0.requestBody", "$P2.body"], | ||
["http.requestCall", "$L1", "$L0"], | ||
["if!=than", "$P2.checkErrors", 0, 1], | ||
["callFunc", "validateResponse", "$P0", "$L1"], | ||
["create", "$P1", "AdvancedRequestResponse"], | ||
["set", "$P1.status", "$L1.code"], | ||
["set", "$P1.headers", "$L1.responseHeaders"], | ||
["set", "$P1.body", "$L1.responseBody"] | ||
], | ||
"processRawMeta": [ | ||
@@ -1038,2 +1064,17 @@ ["size", "$L0", "$P2"], | ||
}; | ||
OneDriveBusiness.prototype.advancedRequest = function (specification, callback) { | ||
Statistics_1.Statistics.addCall("OneDriveBusiness", "advancedRequest"); | ||
var ip = new Interpreter_1.Interpreter(new Sandbox_1.Sandbox(SERVICE_CODE, this.persistentStorage, this.instanceDependencyStorage)); | ||
ip.callFunction("AdvancedRequestSupporter:advancedRequest", this.interpreterStorage, null, specification).then(function () { | ||
Helper_1.Helper.checkSandboxError(ip); | ||
}).then(function () { | ||
var res; | ||
res = ip.getParameter(1); | ||
if (callback != null && typeof callback === "function") | ||
callback(undefined, res); | ||
}, function (err) { | ||
if (callback != null && typeof callback === "function") | ||
callback(err); | ||
}); | ||
}; | ||
OneDriveBusiness.prototype.saveAsString = function () { | ||
@@ -1040,0 +1081,0 @@ Statistics_1.Statistics.addCall("OneDriveBusiness", "saveAsString"); |
@@ -18,2 +18,4 @@ "use strict"; | ||
var BusinessFileMetaData_1 = require("./BusinessFileMetaData"); | ||
var AdvancedRequestSpecification_1 = require("./AdvancedRequestSpecification"); | ||
var AdvancedRequestResponse_1 = require("./AdvancedRequestResponse"); | ||
var Types = (function () { | ||
@@ -39,3 +41,5 @@ function Types() { | ||
"Bucket": Bucket_1.Bucket, | ||
"BusinessFileMetaData": BusinessFileMetaData_1.BusinessFileMetaData | ||
"BusinessFileMetaData": BusinessFileMetaData_1.BusinessFileMetaData, | ||
"AdvancedRequestSpecification": AdvancedRequestSpecification_1.AdvancedRequestSpecification, | ||
"AdvancedRequestResponse": AdvancedRequestResponse_1.AdvancedRequestResponse | ||
}; | ||
@@ -42,0 +46,0 @@ return Types; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
AI-detected potential security risk
Supply chain riskAI has determined that this package may contain potential security issues or vulnerabilities.
Found 1 instance in 1 package
1080297
130
22712
384
4
1