@mastra/client-js 1.59.0-alpha.1 → 1.59.0-alpha.2

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.js CHANGED
@@ -9360,6 +9360,21 @@ var MastraClient = class extends BaseResource {
9360
9360
  return this.request(`/background-tasks/${encodeURIComponent(backgroundTaskId)}`);
9361
9361
  }
9362
9362
  /**
9363
+ * Answers a suspended background task with `resumeData`. Pass the task's
9364
+ * `suspendedAt` to have the server reject the answer (409) when the task has
9365
+ * resumed or suspended again since you read it.
9366
+ */
9367
+ resumeBackgroundTask(backgroundTaskId, resumeData, options = {}) {
9368
+ return this.request(`/background-tasks/${encodeURIComponent(backgroundTaskId)}/resume`, {
9369
+ method: "POST",
9370
+ body: {
9371
+ resumeData,
9372
+ suspendedAt: options.suspendedAt
9373
+ },
9374
+ retries: 0
9375
+ });
9376
+ }
9377
+ /**
9363
9378
  * Opens an SSE stream of background task events (completed/failed).
9364
9379
  * Returns a Response that can be consumed as a ReadableStream.
9365
9380
  */