A TypeScript SDK client for the BMLT Semantic API.
First, install the SDK from npm.
npm install bmlt-server-semantic-client --saveNext, try it out.
import {
Configuration,
FieldsApi,
} from 'bmlt-server-semantic-client';
import type { GetFieldKeysRequest } from 'bmlt-server-semantic-client';
async function example() {
console.log("🚀 Testing bmlt-server-semantic-client SDK...");
const api = new FieldsApi();
try {
const data = await api.getFieldKeys();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);By default, requests target http://localhost:8000/main_server (the server URL baked into the spec). To point the client at a different BMLT server, pass a Configuration with basePath:
import { Configuration, FieldsApi } from 'bmlt-server-semantic-client';
const config = new Configuration({
basePath: 'https://your-bmlt-server.example.org/main_server',
});
const api = new FieldsApi(config);basePath should point at the server's /main_server root — each operation appends its own /client_interface/json/?switcher=... path. Configuration also accepts fetchApi, headers, middleware, and credentials; see ConfigurationParameters in src/runtime.ts for the full list.
All URIs are relative to http://localhost:8000/main_server
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FieldsApi | getFieldKeys | GET /client_interface/json/?switcher=GetFieldKeys | Get all available field keys |
| FieldsApi | getFieldValues | GET /client_interface/json/?switcher=GetFieldValues | Get distinct values for a field |
| FormatsApi | getSemanticFormats | GET /client_interface/json/?switcher=GetFormats | Get meeting formats |
| MeetingsApi | getChanges | GET /client_interface/json/?switcher=GetChanges | Get meeting changes within a date range |
| MeetingsApi | getSearchResults | GET /client_interface/json/?switcher=GetSearchResults | Search for meetings |
| ServerApi | getCoverageArea | GET /client_interface/json/?switcher=GetCoverageArea | Get the geographic coverage bounding box for this server |
| ServerApi | getSemanticServerInfo | GET /client_interface/json/?switcher=GetServerInfo | Get server information |
| ServiceBodiesApi | getSemanticServiceBodies | GET /client_interface/json/?switcher=GetServiceBodies | Get service bodies |
- GetCoverageArea200ResponseInner
- GetFieldKeys200ResponseInner
- GetFieldValues200ResponseInner
- GetSearchResults200Response
- GetSearchResults200ResponseOneOf
- SemanticError
- SemanticFormat
- SemanticMeeting
- SemanticMeetingChange
- SemanticServerInfo
- SemanticServerInfoAggregatorModeEnabled
- SemanticServerInfoAutoGeocodingEnabled
- SemanticServerInfoCountyAutoGeocodingEnabled
- SemanticServerInfoDefaultClosedStatus
- SemanticServerInfoZipAutoGeocodingEnabled
- SemanticServiceBody
Endpoints do not require authorization.
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0 - Package version:
1.0.0 - Generator version:
7.23.0-SNAPSHOT - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildOnce you've built the package, you can publish it to npm:
npm publish