node-zendesk
Advanced tools
Comparing version 2.0.3 to 2.0.5
@@ -623,2 +623,17 @@ --- | ||
``` | ||
### usersegments | ||
```js | ||
list(cb) | ||
listApplicable(cb) | ||
listByUser(userID, cb) | ||
show(sectionID, cb) | ||
listSections(userSegmentID, cb) | ||
listTopics(userSegmentID, cb) | ||
create(userSegment, cb) | ||
update(userSegmentID, userSegment, cb) | ||
delete(userSegmentID, cb) | ||
``` | ||
### subscriptions | ||
@@ -625,0 +640,0 @@ |
@@ -64,3 +64,4 @@ // client.js - node-zendesk client initialization | ||
'AccessPolicies', | ||
'Subscriptions' | ||
'Subscriptions', | ||
'UserSegments' | ||
], | ||
@@ -112,3 +113,3 @@ voiceParts = [ | ||
'serv': { | ||
alias: 'services' | ||
alias: 'services' | ||
} | ||
@@ -120,3 +121,11 @@ }); | ||
if (nconf.get('subdomain')) { | ||
var subdomain | ||
// Allow subdomain to be supplied when global state disabled (library mode) | ||
if (options.stores.defaults.store.subdomain) { | ||
subdomain = options.stores.defaults.store.subdomain | ||
} | ||
if (!subdomain) { | ||
subdomain = nconf.get('subdomain'); | ||
} | ||
if (subdomain) { | ||
var endpoint; | ||
@@ -133,3 +142,3 @@ if (options.stores.defaults.store.helpcenter) { | ||
options.stores.defaults.store.remoteUri = | ||
'https://' + nconf.get('subdomain') + endpoint; | ||
'https://' + subdomain + endpoint; | ||
} | ||
@@ -136,0 +145,0 @@ |
@@ -239,5 +239,8 @@ // client.js - main client file that does most of the processing | ||
return new Promise(function (resolve, reject) { | ||
const stdCallback = function (e, res) { | ||
return e ? reject(e) : resolve(res); | ||
} | ||
var stdCallback = function (error, statusCode, body, response) { | ||
if (error) return reject(error); | ||
return resolve(body); | ||
}; | ||
// assumes a binary file is passed in instead of a path | ||
@@ -244,0 +247,0 @@ if (binary) { |
@@ -25,1 +25,6 @@ //ticketforms.js: Client for the zendesk API. | ||
}; | ||
// // ====================================== Updating TicketForm | ||
TicketForms.prototype.show = function (ticketFormID, cb) { | ||
return this.request('PUT', ['ticket_forms', ticketFormID], ticketForm, cb); | ||
}; |
{ | ||
"name": "node-zendesk", | ||
"version": "2.0.3", | ||
"version": "2.0.5", | ||
"description": "zendesk API client wrapper", | ||
@@ -66,5 +66,5 @@ "keywords": [ | ||
"async": "3.2.x", | ||
"nconf": "0.10.x", | ||
"nconf": "0.11.0", | ||
"querystring": "0.2.x", | ||
"request": "2.88.x" | ||
"request": "2.88.2" | ||
}, | ||
@@ -71,0 +71,0 @@ "devDependencies": { |
173773
3179
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedcliui@7.0.4(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addednconf@0.11.0(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@16.2.0(transitive)
+ Addedyargs-parser@20.2.9(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedcliui@3.2.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedlcid@1.0.0(transitive)
- Removednconf@0.10.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedos-locale@1.4.0(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedwindow-size@0.1.4(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedy18n@3.2.2(transitive)
- Removedyargs@3.32.0(transitive)
Updatednconf@0.11.0
Updatedrequest@2.88.2