@qbraid-core/jobs 0.11.0 → 0.12.1

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 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
 
@@ -1,5 +1,6 @@
1
1
  import { QbraidSession, QbraidClient } from '@qbraid-core/base';
2
- import { QuantumJobResponse, JobQueryParams, DeleteSingleJobResponse, DeleteMultipleJobsResponse, CancelResponse } from './types';
2
+ import { QbraidClientV1, QbraidSessionV1 } from '@qbraid-core/base';
3
+ import { QuantumJobResponse, JobQueryParams, DeleteSingleJobResponse, DeleteMultipleJobsResponse, CancelResponse, JobQueryParamsV1, DeleteJobResponseV1, DeleteMultipleJobsResponseV1, CancelJobResponseV1, JobResult, ProgramData, QuantumJobsResponseV1 } from './types';
3
4
  export declare class QuantumJobsClient extends QbraidClient {
4
5
  constructor(session: QbraidSession);
5
6
  getJobs(params?: JobQueryParams): Promise<QuantumJobResponse>;
@@ -7,3 +8,42 @@ export declare class QuantumJobsClient extends QbraidClient {
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<QuantumJobsResponseV1>;
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
+ /**
38
+ * Get the result of a completed job.
39
+ * @param jobQrn - The job QRN to get results for
40
+ * @returns Job result with status, cost, timestamps, and result data
41
+ */
42
+ getJobResult(jobQrn: string): Promise<JobResult>;
43
+ /**
44
+ * Get the program/circuit data for a job.
45
+ * @param jobQrn - The job QRN to get program for
46
+ * @returns Program data with format and circuit string
47
+ */
48
+ getJobProgram(jobQrn: string): Promise<ProgramData>;
49
+ }
@@ -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,69 @@ 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
+ params: { qrns: JSON.stringify(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?.data ?? { message: 'Unknown error' };
90
+ }
91
+ /**
92
+ * Get the result of a completed job.
93
+ * @param jobQrn - The job QRN to get results for
94
+ * @returns Job result with status, cost, timestamps, and result data
95
+ */
96
+ async getJobResult(jobQrn) {
97
+ const response = await this.session.client.get(`/jobs/${jobQrn}/result`);
98
+ return response.data;
99
+ }
100
+ /**
101
+ * Get the program/circuit data for a job.
102
+ * @param jobQrn - The job QRN to get program for
103
+ * @returns Program data with format and circuit string
104
+ */
105
+ async getJobProgram(jobQrn) {
106
+ const response = await this.session.client.get(`/jobs/${jobQrn}/program`);
107
+ return response.data.data;
108
+ }
109
+ }
110
+ exports.QuantumJobsClientV1 = QuantumJobsClientV1;
45
111
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB,4CAAgE;AAUhE,MAAa,iBAAkB,SAAQ,mBAAY;IACjD,YAAY,OAAsB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAuB;QACnC,MAAM,SAAS,GAAG,MAAM,EAAE,IAAI,EAAE,MAAM,CACpC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE;YACnB,4BAA4B;YAC5B,WAAW,CAAC,QAAQ,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC;YAC3C,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,6BAA6B;QAC7B,EAA4B,CAC7B,CAAC;QAEF,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;QAED,MAAM,WAAW,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAqB,eAAe,EAAE;YAClF,MAAM,EAAE,WAAW;SACpB,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAC/C,iBAAiB,KAAK,EAAE,CACzB,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,UAAoB;QAC3C,MAAM,iBAAiB,GAAG,UAAU,CAAC,IAAI,CA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IAC5B,CAAC;CACF;AAzED,kDAyEC"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C,uBAAuB;;;AAEvB;;GAEG;AACH,mCAA6C;AAApC,2GAAA,iBAAiB,OAAA"}
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"}
@@ -69,3 +69,189 @@ 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
+ * Enumeration for job statusgroup types.
89
+ */
90
+ export declare enum JobStatusGroup {
91
+ ALL = "all",
92
+ PENDING = "pending",
93
+ RETURNED = "returned"
94
+ }
95
+ /**
96
+ * Experiment type enumeration.
97
+ */
98
+ export type ExperimentType = 'gate_model' | 'annealing' | 'analog' | 'other';
99
+ /**
100
+ * Vendor type enumeration.
101
+ */
102
+ export type Vendor = 'aws' | 'azure' | 'ibm' | 'ionq' | 'qbraid';
103
+ /**
104
+ * Provider type enumeration.
105
+ */
106
+ export type Provider = 'aqt' | 'aws' | 'azure' | 'equal1' | 'ibm' | 'iqm' | 'ionq' | 'nec' | 'oqc' | 'pasqal' | 'quantinuum' | 'quera' | 'rigetti' | 'qbraid';
107
+ /**
108
+ * Program format type.
109
+ */
110
+ export type ProgramFormat = 'qasm2' | 'qasm3' | 'qir.bc' | 'qir.ll' | 'analog';
111
+ /**
112
+ * Schema for S3 output destination.
113
+ */
114
+ export interface S3Destination {
115
+ bucket: string;
116
+ directory: string;
117
+ }
118
+ /**
119
+ * Model for capturing time-related information in a job.
120
+ */
121
+ export interface TimeStampsV1 {
122
+ createdAt: string;
123
+ endedAt?: string | null;
124
+ executionDuration?: number | null;
125
+ }
126
+ /**
127
+ * Schema for quantum program.
128
+ */
129
+ export interface Program {
130
+ format: ProgramFormat;
131
+ data: unknown;
132
+ }
133
+ /**
134
+ * Base schema for job fields shared across models.
135
+ * Does not include 'program' field.
136
+ */
137
+ export interface JobBase {
138
+ name?: string | null;
139
+ shots: number;
140
+ deviceQrn: string;
141
+ tags: Record<string, string | number | boolean>;
142
+ runtimeOptions: Record<string, unknown>;
143
+ }
144
+ /**
145
+ * Schema for job submission request body.
146
+ * Extends JobBase and adds the 'program' field.
147
+ */
148
+ export interface JobRequest extends JobBase {
149
+ program: Program;
150
+ }
151
+ /**
152
+ * Schema for runtime job model - base job information.
153
+ * Extends JobBase (not JobRequest) so it does not include 'program' field.
154
+ */
155
+ export interface RuntimeJob extends JobBase {
156
+ jobQrn: string;
157
+ batchJobQrn?: string | null;
158
+ vendor: Vendor;
159
+ provider: Provider;
160
+ status: JobStatus;
161
+ statusMsg?: string | null;
162
+ experimentType: ExperimentType;
163
+ queuePosition?: number | null;
164
+ timeStamps?: TimeStampsV1 | null;
165
+ cost?: number | null;
166
+ estimatedCost: number;
167
+ metadata: Record<string, unknown>;
168
+ }
169
+ /**
170
+ * Schema for platform job model - complete job information.
171
+ * Includes all fields from RuntimeJob + platform-specific fields.
172
+ */
173
+ export interface PlatformJob extends RuntimeJob {
174
+ jobVrn?: string | null;
175
+ organizationUserId: string;
176
+ escrowTransactionId?: string | null;
177
+ settlementTransactionId?: string | null;
178
+ deviceId: string;
179
+ providerId: string;
180
+ error?: string | null;
181
+ s3Destination: S3Destination;
182
+ device: {
183
+ name: string;
184
+ status: string;
185
+ type: string;
186
+ vendor: string;
187
+ };
188
+ }
189
+ /**
190
+ * Query parameters for fetching jobs (V1).
191
+ */
192
+ export interface JobQueryParamsV1 {
193
+ statusGroup?: JobStatusGroup;
194
+ vendor?: Vendor;
195
+ provider?: Provider;
196
+ search?: string;
197
+ page?: number;
198
+ limit?: number;
199
+ tags?: Record<string, string | number | boolean>;
200
+ }
201
+ /**
202
+ * Response for fetching jobs (V1).
203
+ */
204
+ export interface QuantumJobsResponseV1 {
205
+ success: boolean;
206
+ data: PlatformJob[];
207
+ pagination: {
208
+ page: number;
209
+ limit: number;
210
+ total: number;
211
+ totalPages: number;
212
+ hasNext: boolean;
213
+ hasPrev: boolean;
214
+ };
215
+ meta: {
216
+ timestamp: string;
217
+ };
218
+ }
219
+ /**
220
+ * Response for deleting a single job (V1).
221
+ */
222
+ export interface DeleteJobResponseV1 {
223
+ message: string;
224
+ jobQrn?: string;
225
+ }
226
+ /**
227
+ * Response for deleting multiple jobs (V1).
228
+ */
229
+ export interface DeleteMultipleJobsResponseV1 {
230
+ message: string;
231
+ deletedJobs?: string[];
232
+ failedJobs?: string[];
233
+ }
234
+ /**
235
+ * Response for cancelling a job (V1).
236
+ */
237
+ export interface CancelJobResponseV1 {
238
+ message: string;
239
+ jobQrn?: string;
240
+ status?: JobStatus;
241
+ }
242
+ /**
243
+ * Schema for job result.
244
+ */
245
+ export interface JobResult {
246
+ status: JobStatus;
247
+ cost: number;
248
+ timeStamps: TimeStampsV1;
249
+ resultData: Record<string, unknown>;
250
+ }
251
+ /**
252
+ * Schema for program data response.
253
+ */
254
+ export interface ProgramData {
255
+ format: ProgramFormat;
256
+ data: string;
257
+ }
package/dist/src/types.js CHANGED
@@ -2,4 +2,31 @@
2
2
  // Copyright (c) 2025, qBraid Development Team
3
3
  // All rights reserved.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.JobStatusGroup = 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 = {}));
23
+ /**
24
+ * Enumeration for job statusgroup types.
25
+ */
26
+ var JobStatusGroup;
27
+ (function (JobStatusGroup) {
28
+ JobStatusGroup["ALL"] = "all";
29
+ JobStatusGroup["PENDING"] = "pending";
30
+ JobStatusGroup["RETURNED"] = "returned";
31
+ })(JobStatusGroup || (exports.JobStatusGroup = JobStatusGroup = {}));
5
32
  //# sourceMappingURL=types.js.map
@@ -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;AAED;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
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.11.0",
4
+ "version": "0.12.1",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "author": "qBraid Development Team",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {},
39
39
  "peerDependencies": {
40
- "@qbraid-core/base": "0.11.0"
40
+ "@qbraid-core/base": "0.12.1"
41
41
  },
42
42
  "scripts": {
43
43
  "clean": "rimraf dist tsconfig.tsbuildinfo src/*.d.ts src/*.js",