
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Node npm module to serve as an intermediary client for all calls to the Solink API
npm install solink-js --save
var SolinkAPI = require('solink-js'),
url = 'http://localhost:8800' || 'https://api.solinkcloud.com',
token = {
"auth_token": "thisisthetoken",
"aws": {
"accessKeyId": "ACCESSKEYID",
"secretAccessKey": "secret/Acce/ssKey",
"sessionToken": "session+Token"
}
},
credentials = {
'email' : 'irfanisawesome@email.com',
'password' : 'password'
}
// URL defaults to cloud url
var api = new SolinkAPI(credentials[, url]) || new SolinkAPI(token[, url])
General usage:
api.endpoint.action(params)
.then(function(res) {
console.log('worked!')
}, function(err) {
console.log(err.statusCode)
})
Supported endpoints & actions:
auth.
login({email: 'email@email.com', password: 'password'})
setPassword({email: 'email@email.com', password: 'password'})
forgotPassword({email: 'email@email.com', newPassword: 'newPassword'})
refresh(refreshToken, jwtToken)
events.
find('event_id')
find({offset: 1, count: 10, start: '1995-24-12T12:30:00'})
create(ev) // event object
histogram({date: '1995-24-12T12:30:00', range: 'day'})
filters.
create(filter) // filter object
find('filter_id')
find({offset: 1, count: 3})
update('filter_id', ufilter) // updated filter object
delete('filter_id')
users.
create(user) // user object
find('user_id')
find({offset: 1, count: 3})
delete('id')
locations.
find() // list nvr locations
find(nvr_id) //locations/nvr_id
tree(orgPath, depth) // orgpath format: 'Canada/Ontario/Kanata', depth: int
cameras(camera_id).at(nvr_id)
cameras({offset: 0, count: 1}).at(nvr_id)
images.
get('image_path.png') // fetches image url in S3 bucket
Each function defined above returns a promise, error-handling is left upto the user, functions can therefore be chained/nested:
api.filters.create(filter)
.then(function(res) { console.log('created') })
.then(function() {
api.filters.find(filter.id)
.then(function(res) { console.log('found') })
.then(function() {
api.filters.update(filter.id, filter)
.then(function(res) { console.log('updated') })
.then(function() {
api.filters.delete(filter.id)
.then(function() { console.log('deleted') })
})
})
})
Each promise will propogate any error if thrown from the platform. This can be caught and addressed as follows:
api.users.create(user)
.then(function(res) { } )
.catch(function(err) { console.log('err, do something') } )
FAQs
intermediary client for all HTTP requests to solink cloud hosted api
We found that solink-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.