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 4.0.5 to 5.0.0

dist/index.js

38

package.json
{
"name": "node-zendesk",
"version": "4.0.5",
"version": "5.0.0",
"type": "commonjs",

@@ -25,11 +25,29 @@ "description": "zendesk API client wrapper",

},
"main": "./src/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.js"
}
},
"files": [
"dist"
],
"scripts": {
"clean:dist": "npx rimraf ./dist",
"esbuild": "npx esbuild ./src/index.js --bundle --outdir=dist --platform=node --target=node18 --minify --packages=external --format=cjs",
"build:types": "npx -p typescript tsc ./src/**/**/*.js --declaration --allowJs --emitDeclarationOnly --outDir dist/types",
"build": "npm run clean:dist && npm run build:types && npm run esbuild",
"prepublishOnly": "npm run build",
"postpublish": "npm run clean:dist",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"lint": "xo",
"lint:fix": "xo --fix",
"docs:code": "npx typedoc --out ./docs/code --plugin typedoc-plugin-markdown 'dist/**/*.ts'",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"lint": "xo",
"lint:fix": "xo --fix",
"docs:preview": "vitepress preview docs"
"docs:preview": "vitepress preview docs",
"docs:deploy-github-pages": "npm run build && npm run docs:code && npm run docs:build",
"release": "git push origin --follow-tags"
},

@@ -81,10 +99,18 @@ "author": "Farrin Reid <blakmatrix@gmail.com>",

},
"dependencies": {
"cross-fetch": "^4.0.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^0.34.3",
"dotenv": "^16.3.1",
"eslint-plugin-jsdoc": "^46.8.2",
"nock": "^13.3.3",
"request": "^2.88.2",
"typedoc": "^0.25.2",
"typedoc-plugin-markdown": "^3.16.0",
"vitepress": "^1.0.0-rc.20",
"vitepress-sidebar": "^1.18.0",
"vitest": "^0.34.3",
"vue-github-button": "^3.1.0",
"xo": "^0.56.0"
}
}

39

ReadMe.md

@@ -47,3 +47,5 @@ <div align="center">

$ npm install --save node-zendesk
```shell
npm install --save node-zendesk
```

@@ -55,2 +57,3 @@

var zendesk = require('node-zendesk');
// or `import {createClient} from 'node-zendesk'` if using typescript

@@ -60,33 +63,19 @@ var client = zendesk.createClient({

token: 'token',
remoteUri: 'https://remote.zendesk.com/api/v2'
subdomain: 'subdomain'
});
client.users.list(function (err, req, result) {
if (err) {
console.log(err);
return;
}
console.log(JSON.stringify(result[0], null, 2, true));//gets the first page
client.users.list().then(users => {
console.log('Total Users:', users.length);
console.log('User Names:', users.map(user => user.name));
}).catch(error => {
console.error(`Failed to get list of users: ${error.message}`);
});
```
or you can use `Promises`, you just need to skip the callback:
```js
var zendesk = require('node-zendesk');
var client = zendesk.createClient({
username: 'username',
token: 'token',
remoteUri: 'https://remote.zendesk.com/api/v2'
});
client.users.list()
.then(function(result) {
console.log(JSON.stringify(result[0], null, 2, true));//gets the first page
})
.catch(function(error) {
console.log(error);
});
```
Take a look in the `examples` folder for more examples.
## Getting Started
If you're new to `node-zendesk`, we recommend checking out our [Getting Started Guide](https://blakmatrix.github.io/node-zendesk/guide) to help you set up and familiarize yourself with the library.
## Contributions

@@ -93,0 +82,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