@or-sdk/discovery
v1.14.2
Published
OneReach SDK client for Discovery
Readme
@or-sdk/discovery
OneReach SDK client for Discovery.
When to use
- Use this package when integrating with the Discovery capability on the OneReach platform.
- Use its typed client and exported models instead of hand-writing requests to that service.
When not to use
- Do not use it for a different platform capability; choose the dedicated
@or-sdk/*package instead. - Do not use it for generic third-party HTTP calls.
Installation
$ npm i @or-sdk/discoveryUsage
import { Discovery } from '@or-sdk/discovery'
const discovery = new Discovery({
token: 'my-account-token-string',
discoveryUrl: 'http://example.discovery/endpoint'
});Configuration
discoveryUrlis the Discovery API endpoint used by this client, not a fallback for a separate service URL.- Supply
discoveryUrlwhen constructing the client. - Provide
tokenas a bearer-token string or getter where supported.
Common pitfalls
- Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
- Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.
Method map
| Method | Purpose |
|---|---|
| listServices(...) | See the exported TypeScript signature for parameters and result. |
| listServicesByCategory(...) | See the exported TypeScript signature for parameters and result. |
| getServiceUrl(...) | See the exported TypeScript signature for parameters and result. |
| deleteService(...) | See the exported TypeScript signature for parameters and result. |
| createOrUpdateService(...) | See the exported TypeScript signature for parameters and result. |
| hideService(...) | See the exported TypeScript signature for parameters and result. |
| revealService(...) | See the exported TypeScript signature for parameters and result. |
| getServiceUrls(...) | See the exported TypeScript signature for parameters and result. |
| getEnv(...) | See the exported TypeScript signature for parameters and result. |
| getProvidersAccountId(...) | See the exported TypeScript signature for parameters and result. |
| getCurrentAccountId(...) | See the exported TypeScript signature for parameters and result. |
More detail
Full signatures and exported types are available in src/ and dist/types/.
