@or-sdk/queue-manager
v2.0.3
Published
OneReach SDK client for Queue Manager
Readme
@or-sdk/queue-manager
OneReach SDK client for Queue Manager (SERVICE_KEY: queue-manager-api).
When to use
- Use this package when integrating with the Queue Manager 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/queue-managerUsage
import { QueueManager } from '@or-sdk/queue-manager'
// with direct api url
const queueManager = new QueueManager({
token: 'my-account-token-string',
serviceUrl: 'http://example.queue-manager/endpoint'
});
// with service discovery(slower)
const queueManager = new QueueManager({
token: 'my-account-token-string',
discoveryUrl: 'http://example.discovery/endpoint'
});Configuration
- Prefer
serviceUrlwhen the service URL is known; it avoids a discovery request. - Use
discoveryUrlonly when the service URL is not available. - 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 |
|---|---|
| listQueues(...) | See the exported TypeScript signature for parameters and result. |
| scrollQueues(...) | See the exported TypeScript signature for parameters and result. |
| checkQueueName(...) | See the exported TypeScript signature for parameters and result. |
| deleteQueue(...) | See the exported TypeScript signature for parameters and result. |
| createQueue(...) | See the exported TypeScript signature for parameters and result. |
| updateQueue(...) | See the exported TypeScript signature for parameters and result. |
| getAttributes(...) | See the exported TypeScript signature for parameters and result. |
| getMetricData(...) | See the exported TypeScript signature for parameters and result. |
More detail
Full signatures and exported types are available in src/ and dist/types/.
