@devicepark/allocation-client
v1.0.2
Published
Node.js client for DevicePark Allocation API
Readme
@devicepark/allocation-client
Node.js client for interacting with the DevicePark Allocation API.
This library allows you to allocate, release, and manage device test allocations via the DevicePark platform.
✨ Features
- ✅ OAuth2 Client Credentials support (via shared config)
- ♻️ Token caching and retry logic (powered by Axios interceptors)
- 🔁 Allocation lifecycle: create, get, delete
📦 Installation
npm install @devicepark/allocation-client🚀 Usage
import { DeviceAllocationClient } from '@devicepark/allocation-client';
import { init } from '@devicepark/shared';
init({
apiUrl: 'https://<devicepark_api_uri>',
authentication: {
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
issuerUri: 'https://<devicepark_auth_uri>',
}
});
const request = {
manufacturer: 'Samsung',
model: 'Galaxy S20',
platform: 'ANDROID',
platformVersion: '13.0'
};
const allocation = await DeviceAllocationClient.createAllocation(request);
console.log(allocation);🔗 Related Packages
🛡 License
MIT
