@queuebase/core 1.2.0 → 1.3.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/dist/index.d.cts CHANGED
@@ -151,6 +151,12 @@ type ExtractJobOutput<T extends AnyJobDefinition> = T['handler'] extends (ctx: J
151
151
  type CallableJobRouter<T extends Record<string, AnyJobDefinition>> = {
152
152
  [K in keyof T]: CallableJob<ExtractJobInput<T[K]>, ExtractJobOutput<T[K]>>;
153
153
  };
154
+ /**
155
+ * A job client with callable jobs and a top-level getStatus method
156
+ */
157
+ type JobClient<T extends Record<string, AnyJobDefinition>> = CallableJobRouter<T> & {
158
+ getStatus: (jobId: string) => Promise<JobStatusResponse>;
159
+ };
154
160
 
155
161
  /**
156
162
  * Creates a job definition with typed input and handler
@@ -219,4 +225,4 @@ declare function processJobCallback(router: Record<string, AnyJobDefinition>, re
219
225
  webhookSecret?: string;
220
226
  }): Promise<HandlerResponse>;
221
227
 
222
- export { type AnyJobDefinition, type BackoffStrategy, type CallableJob, type CallableJobRouter, type EnqueueOptions, type EnqueueResult, type HandlerRequest, type HandlerResponse, type InferJobInput, type InferJobOutput, type JobContext, type JobDefinition, type JobResult, type JobRouter, type JobStatus, type JobStatusResponse, type QueuebaseConfig, type QueuedJob, WEBHOOK_HEADERS, calculateBackoff, createJobRouter, generateJobId, generatePublicId, job, parseDelay, processJobCallback, signPayload, verifySignature };
228
+ export { type AnyJobDefinition, type BackoffStrategy, type CallableJob, type CallableJobRouter, type EnqueueOptions, type EnqueueResult, type HandlerRequest, type HandlerResponse, type InferJobInput, type InferJobOutput, type JobClient, type JobContext, type JobDefinition, type JobResult, type JobRouter, type JobStatus, type JobStatusResponse, type QueuebaseConfig, type QueuedJob, WEBHOOK_HEADERS, calculateBackoff, createJobRouter, generateJobId, generatePublicId, job, parseDelay, processJobCallback, signPayload, verifySignature };
package/dist/index.d.ts CHANGED
@@ -151,6 +151,12 @@ type ExtractJobOutput<T extends AnyJobDefinition> = T['handler'] extends (ctx: J
151
151
  type CallableJobRouter<T extends Record<string, AnyJobDefinition>> = {
152
152
  [K in keyof T]: CallableJob<ExtractJobInput<T[K]>, ExtractJobOutput<T[K]>>;
153
153
  };
154
+ /**
155
+ * A job client with callable jobs and a top-level getStatus method
156
+ */
157
+ type JobClient<T extends Record<string, AnyJobDefinition>> = CallableJobRouter<T> & {
158
+ getStatus: (jobId: string) => Promise<JobStatusResponse>;
159
+ };
154
160
 
155
161
  /**
156
162
  * Creates a job definition with typed input and handler
@@ -219,4 +225,4 @@ declare function processJobCallback(router: Record<string, AnyJobDefinition>, re
219
225
  webhookSecret?: string;
220
226
  }): Promise<HandlerResponse>;
221
227
 
222
- export { type AnyJobDefinition, type BackoffStrategy, type CallableJob, type CallableJobRouter, type EnqueueOptions, type EnqueueResult, type HandlerRequest, type HandlerResponse, type InferJobInput, type InferJobOutput, type JobContext, type JobDefinition, type JobResult, type JobRouter, type JobStatus, type JobStatusResponse, type QueuebaseConfig, type QueuedJob, WEBHOOK_HEADERS, calculateBackoff, createJobRouter, generateJobId, generatePublicId, job, parseDelay, processJobCallback, signPayload, verifySignature };
228
+ export { type AnyJobDefinition, type BackoffStrategy, type CallableJob, type CallableJobRouter, type EnqueueOptions, type EnqueueResult, type HandlerRequest, type HandlerResponse, type InferJobInput, type InferJobOutput, type JobClient, type JobContext, type JobDefinition, type JobResult, type JobRouter, type JobStatus, type JobStatusResponse, type QueuebaseConfig, type QueuedJob, WEBHOOK_HEADERS, calculateBackoff, createJobRouter, generateJobId, generatePublicId, job, parseDelay, processJobCallback, signPayload, verifySignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@queuebase/core",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {