
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@infoxchange/iss4
Advanced tools
This package provides a Node.js client for interacting with the ISS v4 REST API. This client has been transpiled from the python client https://github.com/InfoxchangeTS/iss-v4-rest-python-client
npm install iss-v4-rest-nodejs-client
import { ISSV4APIClient } from 'iss-v4-rest-nodejs-client';
// Initialize the client with JWT authentication
const client = new ISSV4APIClient(
'https://api.example.com/api/',
{},
'client_id',
'client_secret'
);
// Or with Basic token authentication
import { BasicTokenSession } from 'iss-v4-rest-nodejs-client';
const client = new ISSV4APIClient(
'https://api.example.com/api/',
{ session: BasicTokenSession },
'your_token'
);
// Directory search provides a simple yet powerfull parameter based method for a simpler search experience
async function simpleSearch() {
try {
const results = await client.directorySearch({
name: 'health services',
lga: 'city of yarra',
fields: '*'
});
console.log(results);
} catch (error) {
console.error('Search failed:', error);
}
}
// Advanced search is provided via the search endpoint and takes Appsearch based filters and boosts
async function advancedSearch() {
try {
const results = await client.search(
'search term',
{ filter_key: 'filter_value' }
);
console.log(results);
} catch (error) {
console.error('Search failed:', error);
}
}
// Entity operations example
async function createOrganisation() {
try {
const response = await client.createOrganisation({
name: 'Test Organisation',
// Other fields...
});
console.log('Organisation created:', response.data);
} catch (error) {
console.error('Failed to create organisation:', error);
}
}
The client supports two authentication methods:
const client = new ISSV4APIClient(
'https://api.example.com/api/',
{},
'client_id',
'client_secret'
);
import { BasicTokenSession } from 'iss-v4-rest-nodejs-client';
const client = new ISSV4APIClient(
'https://api.example.com/api/',
{ session: BasicTokenSession },
'your_token'
);
When working with list operations, you can provide query parameters to filter and paginate results:
// Get organisations with pagination
const organisations = await client.organisations(undefined, { limit: '50', offset: '10' });
// Get services with a search term and filters
const services = await client.services(
{ name: 'Health' }, // search term
{ active: 'true' } // query parameters
);
The client automatically handles various parameter formats, including:
{ limit: '50' }){ limit: ['50'] }){ limit: '50', tags: ['tag1', 'tag2'] })Note: For array parameters, the client uses the first value in the array when making API requests.
The client provides methods for interacting with all the endpoints of the ISS v4 API.
search(term, filters, boosts, serialiser, options) - Search ISS v4directorySearch(queryParams) - Directory search with GET parameterssearchExplain(term, filters, boosts, serialiser, options) - Explain search querysearchElasticsearch(query, params, analyticsQuery, analyticsTags) - Submit an Elasticsearch querymultiSearch(queries) - Perform a multi-searchquerySuggestion(query, options) - Get search suggestionsorganisations(searchTerm, params) - Get a list of organisationsorganisationExists(entityId) - Check if an organisation existsfetchOrganisation(entityId) - Fetch an organisationcreateOrganisation(data) - Create an organisationupdateOrganisation(entityId, data) - Update an organisationdeleteOrganisation(entityId) - Delete an organisationcreateOrUpdateOrganisation(entityId, data) - Create or update an organisationsites(searchTerm, params) - Get a list of sitessiteExists(entityId) - Check if a site existsfetchSite(entityId) - Fetch a sitecreateSite(data) - Create a siteupdateSite(entityId, data) - Update a sitedeleteSite(entityId) - Delete a sitecreateOrUpdateSite(entityId, data) - Create or update a siteservices(searchTerm, params) - Get a list of servicesserviceExists(entityId) - Check if a service existsfetchService(entityId) - Fetch a servicecreateService(data) - Create a serviceupdateService(entityId, data) - Update a servicedeleteService(entityId) - Delete a servicecreateOrUpdateService(entityId, data) - Create or update a servicefetchServiceType(entityId) - Fetch a service typelistServiceTypes(params) - List service typeslistEvents(queryParams) - List eventseventExists(entityId) - Check if an event existsfetchEvent(entityId) - Fetch an eventcreateEvent(data) - Create an eventupdateEvent(entityId, data) - Update an eventdeleteEvent(entityId) - Delete an eventcreateOrUpdateEvent(entityId, data) - Create or update an eventlistAgeGroups(queryParams) - List age groupsfetchAgeGroup(entityId) - Fetch an age grouplistDatasets(queryParams) - List datasetsfetchDataset(entityId) - Fetch a datasetlistCrisisKeywords(queryParams) - List crisis keywordslistRelatedCrisisKeywords(terms) - List related crisis keywordsfetchCrisisKeyword(entityId) - Fetch a crisis keywordcreateCrisisKeyword(data) - Create a crisis keyworddeleteCrisisKeyword(entityId) - Delete a crisis keywordlistLanguages(queryParams) - List languagesfetchLanguage(entityId) - Fetch a languageanalyticsQueries(options) - Fetch query analyticsfetchByExternalId(externalId, organisation) - Fetch by external IDsuggest(suggestionType, start) - Get suggestions# Install dependencies
yarn install
# Build
yarn run build
# Run tests
yarn test
The package includes a comprehensive test suite:
# Run all tests
yarn test
# Run with coverage
yarn test -- --coverage
FAQs
ISS v4 REST API client for Node.js
We found that @infoxchange/iss4 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.