New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-zendesk

Package Overview
Dependencies
Maintainers
3
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-zendesk - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

9

lib/client/attachments.js

@@ -17,10 +17,11 @@ //Attachments.js: Client for the zendesk API.

var fileOption = {
filename: fileOptions.filename
filename: fileOptions.filename,
binary: fileOptions.binary
}
/**
* When attaching multiple files, a token is returned in
* When attaching multiple files, a token is returned in
* the successful 201 response.
* This token can be used in subsequent requests in order
* to associate other attachments with a previous upload.
* to associate other attachments with a previous upload.
* This token expires after 3 days.

@@ -55,2 +56,2 @@ */

this.request('DELETE', ['tickets', ticketID, 'comments', commentID, 'attachments', attachmentID, 'redact'], {}, cb);
};
};

@@ -196,3 +196,4 @@ // client.js - main client file that does most of the processing

token = this.options.get('token'),
uploadOptions = self.options;
uploadOptions = self.options,
binary = uri[1] ? uri[1].binary : false;

@@ -210,8 +211,15 @@ self.options.uri = assembleUrl(self, uri);

out = this._request(self.options, function (err, response, result) {
requestCallback(self, err, response, result, callback);
});
fs.createReadStream(file).pipe(out); // pipe the file!
self.emit('debug::request', self.options);
// assumes a binary file is passed in instead of a path
if(binary){
self.options.body = file;
return this._request(self.options, function (err, response, result) {
requestCallback(self, err, response, result, callback);
});
} else {
out = this._request(self.options, function (err, response, result) {
requestCallback(self, err, response, result, callback);
});
fs.createReadStream(file).pipe(out); // pipe the file!
}
};

@@ -218,0 +226,0 @@

@@ -35,1 +35,6 @@ //SatisfactionRatings.js: Client for the zendesk API.

};
// ====================================== New Incremental Export
SatisfactionRatings.prototype.incremental = function (startTime, cb) {
this.request('GET', ['satisfaction_ratings', {start_time: startTime}], cb);
};

@@ -123,2 +123,6 @@ //users.js: Client for the zendesk API.

Users.prototype.password = function (userId, oldPassword, newPassword, cb) {
this.request('PUT', ['users', userId, 'password'], {"previous_password": oldPassword, "password": newPassword}, cb);
};
// ====================================== New Incremental Users Export with include

@@ -125,0 +129,0 @@ Users.prototype.incrementalInclude = function (startTime, include, cb) {

{
"name": "node-zendesk",
"version": "1.3.0",
"version": "1.4.0",
"description": "zendesk API client wrapper",

@@ -5,0 +5,0 @@ "keywords": [

@@ -175,2 +175,4 @@ # node-zendesk

// token is [optional]
file = // string or Stream (with 'pipe' function)
```

@@ -177,0 +179,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc