omni-osint-query-client
v1.0.1
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 { OpenAPI, HealthService, HealthCheck } from 'omni-osint-query/client'; // Adjust path if needed
// Configure the API client
OpenAPI.BASE = 'http://localhost:8000'; // Adjust if your server runs on a different host/port
// Configure authentication (e.g., with a bearer token)
OpenAPI.TOKEN = 'your-bearer-token';
async function main() {
try {
console.log('Performing health check...');
const healthStatus: HealthCheck = await HealthService.healthCheck();
console.log('Health Check Status:', healthStatus);
} catch (error) {
console.error('Error during health check:', error);
}
}
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