@mastra/client-js 0.13.0 → 0.13.1-alpha.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/CHANGELOG.md +9 -0
- package/dist/index.cjs +25 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/workflow.d.ts +17 -0
- package/dist/resources/workflow.d.ts.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 0.13.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix workflow resuming issue in the playground ([#7988](https://github.com/mastra-ai/mastra/pull/7988))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
|
|
10
|
+
- @mastra/core@0.17.1-alpha.0
|
|
11
|
+
|
|
3
12
|
## 0.13.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1888,6 +1888,14 @@ var Workflow = class extends BaseResource {
|
|
|
1888
1888
|
},
|
|
1889
1889
|
resumeAsync: async (p) => {
|
|
1890
1890
|
return this.resumeAsync({ runId, step: p.step, resumeData: p.resumeData, runtimeContext: p.runtimeContext });
|
|
1891
|
+
},
|
|
1892
|
+
resumeStreamVNext: async (p) => {
|
|
1893
|
+
return this.resumeStreamVNext({
|
|
1894
|
+
runId,
|
|
1895
|
+
step: p.step,
|
|
1896
|
+
resumeData: p.resumeData,
|
|
1897
|
+
runtimeContext: p.runtimeContext
|
|
1898
|
+
});
|
|
1891
1899
|
}
|
|
1892
1900
|
};
|
|
1893
1901
|
}
|
|
@@ -2053,7 +2061,7 @@ var Workflow = class extends BaseResource {
|
|
|
2053
2061
|
`/api/workflows/${this.workflowId}/streamVNext?${searchParams.toString()}`,
|
|
2054
2062
|
{
|
|
2055
2063
|
method: "POST",
|
|
2056
|
-
body: { inputData: params.inputData, runtimeContext },
|
|
2064
|
+
body: { inputData: params.inputData, runtimeContext, closeOnSuspend: params.closeOnSuspend },
|
|
2057
2065
|
stream: true
|
|
2058
2066
|
}
|
|
2059
2067
|
);
|
|
@@ -2105,6 +2113,22 @@ var Workflow = class extends BaseResource {
|
|
|
2105
2113
|
}
|
|
2106
2114
|
});
|
|
2107
2115
|
}
|
|
2116
|
+
/**
|
|
2117
|
+
* Resumes a suspended workflow step that uses streamVNext asynchronously and returns a promise that resolves when the workflow is complete
|
|
2118
|
+
* @param params - Object containing the runId, step, resumeData and runtimeContext
|
|
2119
|
+
* @returns Promise containing the workflow resume results
|
|
2120
|
+
*/
|
|
2121
|
+
resumeStreamVNext(params) {
|
|
2122
|
+
const runtimeContext = parseClientRuntimeContext(params.runtimeContext);
|
|
2123
|
+
return this.request(`/api/workflows/${this.workflowId}/resume-stream?runId=${params.runId}`, {
|
|
2124
|
+
method: "POST",
|
|
2125
|
+
body: {
|
|
2126
|
+
step: params.step,
|
|
2127
|
+
resumeData: params.resumeData,
|
|
2128
|
+
runtimeContext
|
|
2129
|
+
}
|
|
2130
|
+
});
|
|
2131
|
+
}
|
|
2108
2132
|
/**
|
|
2109
2133
|
* Watches workflow transitions in real-time
|
|
2110
2134
|
* @param runId - Optional run ID to filter the watch stream
|