@mastra/client-js 1.0.0-beta.13 → 1.0.0-beta.14
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 +97 -0
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/resources/workflow.d.ts +9 -2
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3077,13 +3077,26 @@ var Workflow = class extends BaseResource {
|
|
|
3077
3077
|
/**
|
|
3078
3078
|
* Retrieves the execution result for a specific workflow run by its ID
|
|
3079
3079
|
* @param runId - The ID of the workflow run to retrieve the execution result for
|
|
3080
|
-
* @param
|
|
3080
|
+
* @param options - Optional configuration
|
|
3081
|
+
* @param options.requestContext - Optional request context to pass as query parameter
|
|
3082
|
+
* @param options.fields - Optional array of fields to return (e.g., ['status', 'result']). Available fields: status, result, error, payload, steps, activeStepsPath, serializedStepGraph. Omitting this returns all fields.
|
|
3083
|
+
* @param options.withNestedWorkflows - Whether to include nested workflow data in steps. Defaults to true. Set to false for better performance when you don't need nested workflow details.
|
|
3081
3084
|
* @returns Promise containing the workflow run execution result
|
|
3082
3085
|
*/
|
|
3083
|
-
runExecutionResult(runId,
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3086
|
+
runExecutionResult(runId, options) {
|
|
3087
|
+
const searchParams = new URLSearchParams();
|
|
3088
|
+
if (options?.fields && options.fields.length > 0) {
|
|
3089
|
+
searchParams.set("fields", options.fields.join(","));
|
|
3090
|
+
}
|
|
3091
|
+
if (options?.withNestedWorkflows !== void 0) {
|
|
3092
|
+
searchParams.set("withNestedWorkflows", String(options.withNestedWorkflows));
|
|
3093
|
+
}
|
|
3094
|
+
const requestContextParam = base64RequestContext(parseClientRequestContext(options?.requestContext));
|
|
3095
|
+
if (requestContextParam) {
|
|
3096
|
+
searchParams.set("requestContext", requestContextParam);
|
|
3097
|
+
}
|
|
3098
|
+
const queryString = searchParams.size > 0 ? `?${searchParams.toString()}` : "";
|
|
3099
|
+
return this.request(`/api/workflows/${this.workflowId}/runs/${runId}/execution-result${queryString}`);
|
|
3087
3100
|
}
|
|
3088
3101
|
/**
|
|
3089
3102
|
* Creates a new workflow run
|