
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@tiledesk/helpcenter-query-client
Advanced tools
Javascript SDK for Tiledesk HelpCenter query REST APIs
Full NodeJS API reference is hosted on Github
Follow this guide to use the Tiledesk Helpcenter JavaScript SDK in your Node.js application.
Before you can add Tiledesk Helpcenter npm lib to your Node.js app, you need a Tiledesk account and a Tiledesk project. Once you create your project you will have a projectID, a user to play with project APIs. Next you must create your own Helpcenter workspace (in one Tiledesk project you can create more Workspaces)
Install HelpCenterQuery library with npm command:
npm install @tiledesk/helpcenter-query-client
Alternatively use package.json to import the library in the "dependencies" property, as in the following example:
{
"name": "Hello Tiledesk nodeJS",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@tiledesk/helpcenter-query-client": "^0.1.3"
}
}
Then run
npm install
Once installed you can import HelpCenterQuery() class in your Node.js file using the "require" command:
const { HelpCenterQuery } = require('@tiledesk/helpcenter-query-client');
To interact with Tiledesk Helpcenter APIs and query your documents you need to create an instance of a HelpCenterQuery() class using his constructor. You MUST supply an APIKEY, an existing Project ID and a valid Workspace ID.
Please refer to the official Tiledesk Help Center guide to better understand how Help Center works and how to get your Workspace ID.
In the next example we first authenticate using our user credentials, then we create a new TiledeskClient instance using a PROJECT_ID and the token we got from authentication:
const helpcenter = new HelpCenterQuery({
APIKEY: "__",
projectId: "YOUR_PROJECT_ID",
workspaceId: "YOUR_HELPCENTER_WORKSPACE_ID",
log: false
});
Once you created your Helpcenter instance you can query your workspace as in the following example:
const helpcenter = new HelpCenterQuery({
APIKEY: APIKEY,
projectId: PROJECT_ID,
workspaceId: WORKSPACE_ID
});
text_to_search = "military";
maxresults = 3;
helpcenter.search(text_to_search, maxresults, (err, results) => {
console.log("results:", results)
assert(results[0].title)
assert(results[0].score)
assert(results[0].url)
});
If instead you are using instance methods working with an instance of TiledeskClient, you must specify the parameter in the constructor config object as config.APIRUL:
const helpcenter = new HelpCenterQuery({
APIKEY: APIKEY,
projectId: PROJECT_ID,
workspaceId: WORKSPACE_ID,
APIURL: API_ENDPOINT,
log: true
});
FAQs
Javascript SDK for Tiledesk HelpCenter query REST APIs
We found that @tiledesk/helpcenter-query-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.