How to use node-zendesk - 4 common examples

To help you get started, we’ve selected a few node-zendesk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rakutentech / docpub / lib / zendesk-uploader / api-utils.js View on Github external
const getClient = function(config) {
    if (!config) {
        throw new Error('Unable to configure ZenDesk client without a config');
    }

    const options = {
        username: config.username,
        token: config.token,
        remoteUri: buildHelpCenterUri(config.url),
        helpcenter: true, // In order to use Help Center APIs, this varialbe must be set to `true` AND `remoteUri` must be set to the Help Center endpoint
        disableGlobalState: true // Run as Library only - not scriptrunner
    };
    const client = zendesk.createClient(options);

    return new ZendeskClientWrapper(client);
};
github rakutentech / docpub / test / unit / zendesk-uploader / client-wrapper.js View on Github external
function createZendeskClient_(opts) {
    opts = _.defaults(opts || {}, {
        username: 'username',
        remoteUri: 'uri',
        helpcenter: true,
        disableGlobalState: true
    });

    const nodeZendesk = zendesk.createClient(opts);

    return new ZendeskClientWrapper(nodeZendesk);
}
github rakutentech / docpub / test / unit / zendesk-uploader / client-wrapper.js View on Github external
before(() => {
        this.zendeskStub = zendesk.createClient({
            username: 'username',
            token: 'token',
            remoteUri: 'uri',
            helpcenter: true,
            disableGlobalState: true
        });
    });
github alphagov / pay-selfservice / app / services / clients / zendesk_client.js View on Github external
'use strict'

const zendesk = require('node-zendesk')
const logger = require('../../utils/logger')(__filename)
const zendeskConfig = require('../../../config/zendesk')

const zendeskClient = zendesk.createClient({
  username: process.env.ZENDESK_USER,
  token: process.env.ZENDESK_API_KEY,
  remoteUri: process.env.ZENDESK_URL,
  proxy: process.env.http_proxy
})

module.exports = {

  createTicket: opts => {
    return new Promise(function (resolve, reject) {
      zendeskClient.tickets.create({
        ticket: {
          requester: {
            email: opts.email,
            name: opts.name
          },

node-zendesk

A trusted Zendesk API client library for Node.js and the browser, lovingly maintained for over 10 years.

MIT
Latest version published 4 months ago

Package Health Score

84 / 100
Full package analysis

Popular node-zendesk functions