omni-osint-query-client
v2.1.0
Published
This directory contains the generated TypeScript client for the API.
Readme
Omni Osint Query Client
This directory contains the generated TypeScript client for the Omni Osint Query API.
Usage
To use the client in your Node.js project, you can install it directly from GitHub. Add the following to your package.json:
{
"dependencies": {
"omni-osint-query-client": "latest"
}
}After installation, you can use the client in your application as shown below:
import { client } from 'omni-osint-query-client/client';
import { healthCheck } from 'omni-osint-query-client/sdk';
client.setConfig({
baseURL: "http://localhost:8000",
withCredentials: true,
});
client.instance.interceptors.request.use((config) => {
config.headers['Authorization'] = `Bearer ${token}`;
return config;
});
async function main() {
console.log('Performing health check...');
const { data, error, status } = await healthCheck();
if (error) {
console.error(`Error [${status}] during health check:`, error);
} else {
console.log('Health Check Status:', data.status);
}
}
main();💻 Setup Client
Located in client/ directory.
Install client dependencies:
npm installGenerate client:
npm run generate👨💻 Client Development
Run unit tests:
docker compose up -d --wait
cd client
npm run test
cd ..
docker compose downBuild the client:
npm run buildPublish the client:
npm login
npm publish