@qbraid-core/devices 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/src/client.d.ts +4 -4
- package/dist/src/client.js +6 -4
- package/dist/src/client.js.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +11 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
<img align="right" width="100" alt="qbraid" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid.png">
|
|
2
|
+
|
|
3
|
+
# [@qbraid-core/devices](https://qbraid.github.io/qbraid-core-js/modules/devices.html)
|
|
4
|
+
|
|
5
|
+
[![Stable][preview-stability]](https://qbraid.github.io/qbraid-core-js/#launch-stages)
|
|
6
|
+
[](https://npm.im/@qbraid-core/devices)
|
|
2
7
|
|
|
3
8
|
Client for the qBraid Quantum Devices service.
|
|
4
9
|
|
|
@@ -19,3 +24,11 @@ const devices = await client.getDevices();
|
|
|
19
24
|
|
|
20
25
|
devices.forEach(device => console.log(`${device.qbraid_id} - ${device.status}`));
|
|
21
26
|
```
|
|
27
|
+
|
|
28
|
+
## License
|
|
29
|
+
|
|
30
|
+
This software is proprietary and subject to the terms of the [qBraid Commercial Software License](https://qbraid.github.io/qbraid-core-js/#license).
|
|
31
|
+
|
|
32
|
+
[stable-stability]: https://img.shields.io/badge/stability-stable-green
|
|
33
|
+
[preview-stability]: https://img.shields.io/badge/stability-preview-orange
|
|
34
|
+
[deprecated-stability]: https://img.shields.io/badge/stability-deprecated-red
|
package/dist/src/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { QbraidClient,
|
|
2
|
-
import { Device } from './types';
|
|
1
|
+
import { QbraidClient, QbraidSession } from '@qbraid-core/base';
|
|
2
|
+
import { Device, DeviceQueryParams } from './types';
|
|
3
3
|
export declare class QuantumDevicesClient extends QbraidClient {
|
|
4
|
-
constructor(
|
|
5
|
-
getDevices(): Promise<Device[]>;
|
|
4
|
+
constructor(session?: QbraidSession);
|
|
5
|
+
getDevices(params?: DeviceQueryParams): Promise<Device[]>;
|
|
6
6
|
}
|
package/dist/src/client.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Copyright (c) 2025, qBraid Development Team
|
|
3
|
+
// All rights reserved.
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.QuantumDevicesClient = void 0;
|
|
4
6
|
const base_1 = require("@qbraid-core/base");
|
|
5
7
|
class QuantumDevicesClient extends base_1.QbraidClient {
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
8
|
+
constructor(session) {
|
|
9
|
+
super(session);
|
|
8
10
|
}
|
|
9
|
-
async getDevices() {
|
|
10
|
-
const response = await this.session.
|
|
11
|
+
async getDevices(params) {
|
|
12
|
+
const response = await this.session.client.get('/quantum-devices', { params });
|
|
11
13
|
return response.data;
|
|
12
14
|
}
|
|
13
15
|
}
|
package/dist/src/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB,4CAAgE;AAIhE,MAAa,oBAAqB,SAAQ,mBAAY;IACpD,YAAY,OAAuB;QACjC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAA0B;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAW,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QACzF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF;AATD,oDASC"}
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB;;GAEG;AACH,mCAAgD;AAAvC,8GAAA,oBAAoB,OAAA"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -20,3 +20,14 @@ export interface Device {
|
|
|
20
20
|
pricing?: DevicePricing;
|
|
21
21
|
[key: string]: unknown;
|
|
22
22
|
}
|
|
23
|
+
export interface DeviceQueryParams {
|
|
24
|
+
name?: string;
|
|
25
|
+
qbraid_id?: string;
|
|
26
|
+
vendor?: string;
|
|
27
|
+
provider?: string;
|
|
28
|
+
type?: string;
|
|
29
|
+
status?: string;
|
|
30
|
+
isAvailable?: boolean;
|
|
31
|
+
runPackage?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
package/dist/src/types.js
CHANGED
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qbraid-core/devices",
|
|
3
3
|
"description": "Client for the qBraid Quantum Devices service.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
7
7
|
"author": "qBraid Development Team",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://qbraid.github.io/qbraid-core-js/modules/devices.html",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@qbraid-core/base": "0.
|
|
32
|
+
"@qbraid-core/base": "0.2.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"clean": "rimraf dist
|
|
35
|
+
"clean": "rimraf dist tsconfig.tsbuildinfo src/*.d.ts src/*.js",
|
|
36
36
|
"lint": "eslint src",
|
|
37
37
|
"lint:fix": "eslint src --fix",
|
|
38
38
|
"format": "prettier --write \"src/**/*.{ts,json}\"",
|