Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@telia-ace/knowledge-serviceclient
Advanced tools
Service client for communication with classical ACE Knowledge projections.
Readme
The Service Client provides an API for interacting with classic Humany projections. A projection is a URL representing a subset of content (guides, categories, contact methods etc) in a Humany application.
The standard format of a Projection URL consists of the root application url followed by the projection name.
https://[application].humany.net/[projection-name]
Create an instance by passing the Projection URL as the first constructor argument.
import { ServiceClient } from '@telia-ace/knowledge-serviceclient';
const projection = '[projection-url]';
const serviceClient = new ServiceClient(projection);
The second constructor argument can be used to pass additional ServiceClientOptions
.
ServiceClientOptions
Argument | Description | Type |
---|---|---|
funnel | Funnel to report statistics on. | string |
client | Unique ID for the client | string |
site | Site (URI) to report statistics on. | string |
paging | Default paging options | object |
Comments
Match guides based on a search phrase.
match(phrase, success, [error])
Argument | Description | Type |
---|---|---|
phrase | The phrase to match. | string |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
match(phrase, options, success, [error])
Argument | Description | Type |
---|---|---|
phrase | The phrase to match. | string |
options | Additional matching options | MatchingOptions |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
MatchingOptions
Argument | Description | Type |
---|---|---|
statisticsDisabled | Whether statistics should be reported for the request. | boolean (default: false) |
categoryId | Limit the matching to the specified category | number |
Example
serviceClient.match('hello world', (matchResult) => {
console.log('matched guides:', matchResult.Matches);
});
getCategories(success, [error])
Argument | Description | Type |
---|---|---|
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
getCategories(options, success, [error])
Argument | Description | Type |
---|---|---|
options | Additional matching options | CategoriesOptions |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
CategoriesOptions
Argument | Description | Type |
---|---|---|
phrase | Get categories containging guides matching a phrase | string |
categoryId | Limit the matching to the specified category | number |
expand | Possible values: 'none' , 'children' , 'descendants' | string |
Example
serviceClient.getCategories((categoryResult) => {
console.log('all categories:', categoryResult.Children);
});
getGuide(id, success, [error])
Argument | Description | Type |
---|---|---|
id | Guide ID. | number |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
getGuide(id, options, success, [error])
Argument | Description | Type |
---|---|---|
id | Guide ID. | number |
options | Additional guide options. | GuideOptions |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
getGuide(id, connectionKey, success, [error])
Argument | Description | Type |
---|---|---|
id | Guide ID. | number |
connectionKey | A connection key (part of dialog) to get. | string |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
getGuide(id, connectionKey, options, success, [error])
Argument | Description | Type |
---|---|---|
id | Guide ID. | number |
connectionKey | A connection key (part of dialog) to get. | string |
options | Additional guide options. | GuideOptions |
success | Callback returning the result. | function |
error | Callback returning a description of the error. | function |
GuideOptions
Argument | Description | Type |
---|---|---|
statisticsDisabled | Whether statistics should be reported for the request. | boolean (default: false) |
Comments
giveFeedback(id, connectionKey, feedbackType, [success, error])
Argument | Description | Type |
---|---|---|
id | Guide ID. | number |
connectionKey | A connection key (part of dialog) to give feedback on. | string |
feedbackType | Type of feedback to give (Positive or Negative ). | string |
For implementations running version 4 you can author a plugin and access the current Service Client through the container
under the key 'matchingClient'
. The value must be resolved asynchronously as in the example below.
import { Plugin } from '@telia-ace/knowledge-widget-core';
class MyPlugin extends Plugin {
initialize() {
this.container.getAsync('matchingClient').then((matchingClient) => {
// use 'matchingClient' here
});
}
}
FAQs
Service client for communication with classical ACE Knowledge projections.
The npm package @telia-ace/knowledge-serviceclient receives a total of 308 weekly downloads. As such, @telia-ace/knowledge-serviceclient popularity was classified as not popular.
We found that @telia-ace/knowledge-serviceclient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.