@qbraid-core/jobs 0.10.2 → 0.12.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 +16 -0
- package/dist/src/client.d.ts +30 -2
- package/dist/src/client.js +49 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/index.d.ts +4 -2
- package/dist/src/index.js +5 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +142 -0
- package/dist/src/types.js +18 -0
- package/dist/src/types.js.map +1 -1
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -15,6 +15,22 @@ npm install @qbraid-core/jobs
|
|
|
15
15
|
|
|
16
16
|
## Usage Example
|
|
17
17
|
|
|
18
|
+
### V1 API (Recommended)
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { QbraidSessionV1 } from '@qbraid-core/base';
|
|
22
|
+
import { QuantumJobsClientV1 } from '@qbraid-core/jobs';
|
|
23
|
+
|
|
24
|
+
const session = new QbraidSessionV1('your-api-key');
|
|
25
|
+
const client = new QuantumJobsClientV1(session);
|
|
26
|
+
|
|
27
|
+
const jobs = await client.getJobs();
|
|
28
|
+
|
|
29
|
+
jobs.forEach(job => console.log(`${job.qrn} - ${job.status}`));
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### V0 API (Legacy)
|
|
33
|
+
|
|
18
34
|
```typescript
|
|
19
35
|
import { QuantumJobsClient } from '@qbraid-core/jobs';
|
|
20
36
|
|
package/dist/src/client.d.ts
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { QbraidSession, QbraidClient } from '@qbraid-core/base';
|
|
2
|
-
import {
|
|
2
|
+
import { QbraidClientV1, QbraidSessionV1 } from '@qbraid-core/base';
|
|
3
|
+
import { QuantumJobResponse, JobQueryParams, DeleteSingleJobResponse, DeleteMultipleJobsResponse, CancelResponse, PlatformJob, JobQueryParamsV1, DeleteJobResponseV1, DeleteMultipleJobsResponseV1, CancelJobResponseV1 } from './types';
|
|
3
4
|
export declare class QuantumJobsClient extends QbraidClient {
|
|
4
|
-
constructor(session
|
|
5
|
+
constructor(session: QbraidSession);
|
|
5
6
|
getJobs(params?: JobQueryParams): Promise<QuantumJobResponse>;
|
|
6
7
|
deleteJob(jobId: string): Promise<DeleteSingleJobResponse>;
|
|
7
8
|
deleteMultipleJobs(jobIdArray: string[]): Promise<DeleteMultipleJobsResponse>;
|
|
8
9
|
cancelJobs(jobId: string): Promise<CancelResponse>;
|
|
9
10
|
}
|
|
11
|
+
export declare class QuantumJobsClientV1 extends QbraidClientV1 {
|
|
12
|
+
constructor(session: QbraidSessionV1);
|
|
13
|
+
/**
|
|
14
|
+
* Get jobs from the V1 API.
|
|
15
|
+
* @param params - Optional query parameters to filter jobs
|
|
16
|
+
* @returns Array of PlatformJob objects
|
|
17
|
+
*/
|
|
18
|
+
getJobs(params?: JobQueryParamsV1): Promise<PlatformJob[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a single job by its QRN.
|
|
21
|
+
* @param jobQrn - The job QRN to delete
|
|
22
|
+
* @returns Delete response
|
|
23
|
+
*/
|
|
24
|
+
deleteJob(jobQrn: string): Promise<DeleteJobResponseV1>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete multiple jobs by their QRNs.
|
|
27
|
+
* @param jobQrns - Array of job QRNs to delete
|
|
28
|
+
* @returns Delete response with lists of deleted and failed jobs
|
|
29
|
+
*/
|
|
30
|
+
deleteMultipleJobs(jobQrns: string[]): Promise<DeleteMultipleJobsResponseV1>;
|
|
31
|
+
/**
|
|
32
|
+
* Cancel a job by its QRN.
|
|
33
|
+
* @param jobQrn - The job QRN to cancel
|
|
34
|
+
* @returns Cancel response
|
|
35
|
+
*/
|
|
36
|
+
cancelJob(jobQrn: string): Promise<CancelJobResponseV1>;
|
|
37
|
+
}
|
package/dist/src/client.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Copyright (c) 2025, qBraid Development Team
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.QuantumJobsClient = void 0;
|
|
5
|
+
exports.QuantumJobsClientV1 = exports.QuantumJobsClient = void 0;
|
|
6
6
|
const base_1 = require("@qbraid-core/base");
|
|
7
|
+
const base_2 = require("@qbraid-core/base");
|
|
7
8
|
class QuantumJobsClient extends base_1.QbraidClient {
|
|
8
9
|
constructor(session) {
|
|
9
10
|
super(session);
|
|
@@ -42,4 +43,51 @@ class QuantumJobsClient extends base_1.QbraidClient {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
exports.QuantumJobsClient = QuantumJobsClient;
|
|
46
|
+
class QuantumJobsClientV1 extends base_2.QbraidClientV1 {
|
|
47
|
+
// NOTE: the QbraidSessionV1 object might change as we introduce the
|
|
48
|
+
// microservice architecture for the V1 API. For now, we go through
|
|
49
|
+
// the new api, so we have the same pattern as devices
|
|
50
|
+
constructor(session) {
|
|
51
|
+
super(session);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get jobs from the V1 API.
|
|
55
|
+
* @param params - Optional query parameters to filter jobs
|
|
56
|
+
* @returns Array of PlatformJob objects
|
|
57
|
+
*/
|
|
58
|
+
async getJobs(params) {
|
|
59
|
+
const response = await this.session.client.get('/jobs', { params });
|
|
60
|
+
return response?.data ?? [];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete a single job by its QRN.
|
|
64
|
+
* @param jobQrn - The job QRN to delete
|
|
65
|
+
* @returns Delete response
|
|
66
|
+
*/
|
|
67
|
+
async deleteJob(jobQrn) {
|
|
68
|
+
const response = await this.session.client.delete(`/jobs/${jobQrn}`);
|
|
69
|
+
return response?.data ?? { message: 'Unknown error' };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Delete multiple jobs by their QRNs.
|
|
73
|
+
* @param jobQrns - Array of job QRNs to delete
|
|
74
|
+
* @returns Delete response with lists of deleted and failed jobs
|
|
75
|
+
*/
|
|
76
|
+
async deleteMultipleJobs(jobQrns) {
|
|
77
|
+
const response = await this.session.client.delete('/jobs', {
|
|
78
|
+
data: { jobQrns },
|
|
79
|
+
});
|
|
80
|
+
return response?.data ?? { message: 'Unknown error' };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Cancel a job by its QRN.
|
|
84
|
+
* @param jobQrn - The job QRN to cancel
|
|
85
|
+
* @returns Cancel response
|
|
86
|
+
*/
|
|
87
|
+
async cancelJob(jobQrn) {
|
|
88
|
+
const response = await this.session.client.put(`/jobs/${jobQrn}/cancel`);
|
|
89
|
+
return response?.data ?? { message: 'Unknown error' };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.QuantumJobsClientV1 = QuantumJobsClientV1;
|
|
45
93
|
//# sourceMappingURL=client.js.map
|
package/dist/src/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB,4CAAgE;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"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"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module jobs
|
|
3
3
|
*/
|
|
4
|
-
export { QuantumJobsClient } from './client';
|
|
5
|
-
export type { QuantumJobData, QuantumJobResponse, DeleteSingleJobResponse, DeleteMultipleJobsResponse, CancelResponse, } from './types';
|
|
4
|
+
export { QuantumJobsClient, QuantumJobsClientV1 } from './client';
|
|
5
|
+
export type { Tag, TimeStamps, JobQueryParams, QuantumJobData, QuantumJobResponse, DeleteSingleJobResponse, DeleteMultipleJobsResponse, CancelResponse, } from './types';
|
|
6
|
+
export { JobStatus } from './types';
|
|
7
|
+
export type { ExperimentType, Vendor, Provider, ProgramFormat, S3Destination, TimeStampsV1, Program, JobBase, JobRequest, RuntimeJob, PlatformJob, JobQueryParamsV1, DeleteJobResponseV1, DeleteMultipleJobsResponseV1, CancelJobResponseV1, } from './types';
|
package/dist/src/index.js
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
// Copyright (c) 2025, qBraid Development Team
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.QuantumJobsClient = void 0;
|
|
5
|
+
exports.JobStatus = exports.QuantumJobsClientV1 = exports.QuantumJobsClient = void 0;
|
|
6
6
|
/**
|
|
7
7
|
* @module jobs
|
|
8
8
|
*/
|
|
9
9
|
var client_1 = require("./client");
|
|
10
10
|
Object.defineProperty(exports, "QuantumJobsClient", { enumerable: true, get: function () { return client_1.QuantumJobsClient; } });
|
|
11
|
+
Object.defineProperty(exports, "QuantumJobsClientV1", { enumerable: true, get: function () { return client_1.QuantumJobsClientV1; } });
|
|
12
|
+
// V1 Types
|
|
13
|
+
var types_1 = require("./types");
|
|
14
|
+
Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return types_1.JobStatus; } });
|
|
11
15
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB;;GAEG;AACH,mCAAkE;AAAzD,2GAAA,iBAAiB,OAAA;AAAE,6GAAA,mBAAmB,OAAA;AAc/C,WAAW;AACX,iCAAoC;AAA3B,kGAAA,SAAS,OAAA"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -69,3 +69,145 @@ export interface DeleteMultipleJobsResponse {
|
|
|
69
69
|
export interface CancelResponse {
|
|
70
70
|
message: string;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Enumeration for job statuses.
|
|
74
|
+
*/
|
|
75
|
+
export declare enum JobStatus {
|
|
76
|
+
INITIALIZING = "INITIALIZING",
|
|
77
|
+
QUEUED = "QUEUED",
|
|
78
|
+
VALIDATING = "VALIDATING",
|
|
79
|
+
RUNNING = "RUNNING",
|
|
80
|
+
CANCELLING = "CANCELLING",
|
|
81
|
+
CANCELLED = "CANCELLED",
|
|
82
|
+
HOLD = "HOLD",
|
|
83
|
+
COMPLETED = "COMPLETED",
|
|
84
|
+
FAILED = "FAILED",
|
|
85
|
+
UNKNOWN = "UNKNOWN"
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Experiment type enumeration.
|
|
89
|
+
*/
|
|
90
|
+
export type ExperimentType = 'gate_model' | 'annealing' | 'analog' | 'other';
|
|
91
|
+
/**
|
|
92
|
+
* Vendor type enumeration.
|
|
93
|
+
*/
|
|
94
|
+
export type Vendor = 'aws' | 'azure' | 'ibm' | 'ionq' | 'qbraid';
|
|
95
|
+
/**
|
|
96
|
+
* Provider type enumeration.
|
|
97
|
+
*/
|
|
98
|
+
export type Provider = 'aqt' | 'aws' | 'azure' | 'equal1' | 'ibm' | 'iqm' | 'ionq' | 'nec' | 'oqc' | 'pasqal' | 'quantinuum' | 'quera' | 'rigetti' | 'qbraid';
|
|
99
|
+
/**
|
|
100
|
+
* Program format type.
|
|
101
|
+
*/
|
|
102
|
+
export type ProgramFormat = 'qasm2' | 'qasm3' | 'qir.bc' | 'qir.ll' | 'analog';
|
|
103
|
+
/**
|
|
104
|
+
* Schema for S3 output destination.
|
|
105
|
+
*/
|
|
106
|
+
export interface S3Destination {
|
|
107
|
+
bucket: string;
|
|
108
|
+
directory: string;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Model for capturing time-related information in a job.
|
|
112
|
+
*/
|
|
113
|
+
export interface TimeStampsV1 {
|
|
114
|
+
createdAt: string;
|
|
115
|
+
endedAt?: string | null;
|
|
116
|
+
executionDuration?: number | null;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Schema for quantum program.
|
|
120
|
+
*/
|
|
121
|
+
export interface Program {
|
|
122
|
+
format: ProgramFormat;
|
|
123
|
+
data: unknown;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Base schema for job fields shared across models.
|
|
127
|
+
* Does not include 'program' field.
|
|
128
|
+
*/
|
|
129
|
+
export interface JobBase {
|
|
130
|
+
name?: string | null;
|
|
131
|
+
shots: number;
|
|
132
|
+
deviceQrn: string;
|
|
133
|
+
tags: Record<string, string | number | boolean>;
|
|
134
|
+
runtimeOptions: Record<string, unknown>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Schema for job submission request body.
|
|
138
|
+
* Extends JobBase and adds the 'program' field.
|
|
139
|
+
*/
|
|
140
|
+
export interface JobRequest extends JobBase {
|
|
141
|
+
program: Program;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Schema for runtime job model - base job information.
|
|
145
|
+
* Extends JobBase (not JobRequest) so it does not include 'program' field.
|
|
146
|
+
*/
|
|
147
|
+
export interface RuntimeJob extends JobBase {
|
|
148
|
+
jobQrn: string;
|
|
149
|
+
batchJobQrn?: string | null;
|
|
150
|
+
vendor: Vendor;
|
|
151
|
+
provider: Provider;
|
|
152
|
+
status: JobStatus;
|
|
153
|
+
statusMsg?: string | null;
|
|
154
|
+
experimentType: ExperimentType;
|
|
155
|
+
queuePosition?: number | null;
|
|
156
|
+
timeStamps?: TimeStampsV1 | null;
|
|
157
|
+
cost?: number | null;
|
|
158
|
+
estimatedCost: number;
|
|
159
|
+
metadata: Record<string, unknown>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Schema for platform job model - complete job information.
|
|
163
|
+
* Includes all fields from RuntimeJob + platform-specific fields.
|
|
164
|
+
*/
|
|
165
|
+
export interface PlatformJob extends RuntimeJob {
|
|
166
|
+
jobVrn?: string | null;
|
|
167
|
+
organizationUserId: string;
|
|
168
|
+
escrowTransactionId?: string | null;
|
|
169
|
+
settlementTransactionId?: string | null;
|
|
170
|
+
deviceId: string;
|
|
171
|
+
providerId: string;
|
|
172
|
+
error?: string | null;
|
|
173
|
+
s3Destination: S3Destination;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Query parameters for fetching jobs (V1).
|
|
177
|
+
*/
|
|
178
|
+
export interface JobQueryParamsV1 {
|
|
179
|
+
jobQrn?: string;
|
|
180
|
+
deviceQrn?: string;
|
|
181
|
+
status?: JobStatus;
|
|
182
|
+
vendor?: Vendor;
|
|
183
|
+
provider?: Provider;
|
|
184
|
+
search?: string;
|
|
185
|
+
sortOrder?: 'asc' | 'desc';
|
|
186
|
+
sortBy?: 'status' | 'createdAt' | 'endedAt' | 'experimentType';
|
|
187
|
+
experimentType?: ExperimentType;
|
|
188
|
+
page?: number;
|
|
189
|
+
limit?: number;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Response for deleting a single job (V1).
|
|
193
|
+
*/
|
|
194
|
+
export interface DeleteJobResponseV1 {
|
|
195
|
+
message: string;
|
|
196
|
+
jobQrn?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Response for deleting multiple jobs (V1).
|
|
200
|
+
*/
|
|
201
|
+
export interface DeleteMultipleJobsResponseV1 {
|
|
202
|
+
message: string;
|
|
203
|
+
deletedJobs?: string[];
|
|
204
|
+
failedJobs?: string[];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Response for cancelling a job (V1).
|
|
208
|
+
*/
|
|
209
|
+
export interface CancelJobResponseV1 {
|
|
210
|
+
message: string;
|
|
211
|
+
jobQrn?: string;
|
|
212
|
+
status?: JobStatus;
|
|
213
|
+
}
|
package/dist/src/types.js
CHANGED
|
@@ -2,4 +2,22 @@
|
|
|
2
2
|
// Copyright (c) 2025, qBraid Development Team
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.JobStatus = void 0;
|
|
6
|
+
// ==================== V1 Types ====================
|
|
7
|
+
/**
|
|
8
|
+
* Enumeration for job statuses.
|
|
9
|
+
*/
|
|
10
|
+
var JobStatus;
|
|
11
|
+
(function (JobStatus) {
|
|
12
|
+
JobStatus["INITIALIZING"] = "INITIALIZING";
|
|
13
|
+
JobStatus["QUEUED"] = "QUEUED";
|
|
14
|
+
JobStatus["VALIDATING"] = "VALIDATING";
|
|
15
|
+
JobStatus["RUNNING"] = "RUNNING";
|
|
16
|
+
JobStatus["CANCELLING"] = "CANCELLING";
|
|
17
|
+
JobStatus["CANCELLED"] = "CANCELLED";
|
|
18
|
+
JobStatus["HOLD"] = "HOLD";
|
|
19
|
+
JobStatus["COMPLETED"] = "COMPLETED";
|
|
20
|
+
JobStatus["FAILED"] = "FAILED";
|
|
21
|
+
JobStatus["UNKNOWN"] = "UNKNOWN";
|
|
22
|
+
})(JobStatus || (exports.JobStatus = JobStatus = {}));
|
|
5
23
|
//# sourceMappingURL=types.js.map
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAkFvB,qDAAqD;AAErD;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,0CAA6B,CAAA;IAC7B,8BAAiB,CAAA;IACjB,sCAAyB,CAAA;IACzB,gCAAmB,CAAA;IACnB,sCAAyB,CAAA;IACzB,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;AACrB,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qbraid-core/jobs",
|
|
3
3
|
"description": "Client for the qBraid Quantum Jobs service.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
7
7
|
"author": "qBraid Development Team",
|
|
@@ -28,8 +28,16 @@
|
|
|
28
28
|
"url": "git+https://github.com/qBraid/qbraid-core-js.git"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://qbraid.github.io/qbraid-core-js/modules/jobs.html",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"browser": {
|
|
32
|
+
"https": false,
|
|
33
|
+
"http": false,
|
|
34
|
+
"os": false,
|
|
35
|
+
"fs": false,
|
|
36
|
+
"path": false
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@qbraid-core/base": "0.12.0"
|
|
33
41
|
},
|
|
34
42
|
"scripts": {
|
|
35
43
|
"clean": "rimraf dist tsconfig.tsbuildinfo src/*.d.ts src/*.js",
|