@mastra/client-js 0.0.0-main-test-20251105183450 → 0.0.0-main-test-05-11-2025-2-20251105223343
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 -3
- package/dist/client.d.ts +4 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +6 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -27
- package/dist/index.js.map +1 -1
- package/dist/resources/agent-builder.d.ts +0 -11
- package/dist/resources/agent-builder.d.ts.map +1 -1
- package/dist/resources/observability.d.ts +7 -7
- package/dist/resources/observability.d.ts.map +1 -1
- package/dist/resources/workflow.d.ts +0 -12
- package/dist/resources/workflow.d.ts.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1642,17 +1642,6 @@ var Workflow = class extends BaseResource {
|
|
|
1642
1642
|
method: "POST"
|
|
1643
1643
|
});
|
|
1644
1644
|
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Sends an event to a specific workflow run by its ID
|
|
1647
|
-
* @param params - Object containing the runId, event and data
|
|
1648
|
-
* @returns Promise containing a success message
|
|
1649
|
-
*/
|
|
1650
|
-
sendRunEvent(params) {
|
|
1651
|
-
return this.request(`/api/workflows/${this.workflowId}/runs/${params.runId}/send-event`, {
|
|
1652
|
-
method: "POST",
|
|
1653
|
-
body: { event: params.event, data: params.data }
|
|
1654
|
-
});
|
|
1655
|
-
}
|
|
1656
1645
|
/**
|
|
1657
1646
|
* Creates a new workflow run
|
|
1658
1647
|
* @param params - Optional object containing the optional runId
|
|
@@ -2566,17 +2555,6 @@ var AgentBuilder = class extends BaseResource {
|
|
|
2566
2555
|
method: "POST"
|
|
2567
2556
|
});
|
|
2568
2557
|
}
|
|
2569
|
-
/**
|
|
2570
|
-
* Sends an event to an agent builder action run.
|
|
2571
|
-
* This calls `/api/agent-builder/:actionId/runs/:runId/send-event`.
|
|
2572
|
-
*/
|
|
2573
|
-
async sendRunEvent(params) {
|
|
2574
|
-
const url = `/api/agent-builder/${this.actionId}/runs/${params.runId}/send-event`;
|
|
2575
|
-
return this.request(url, {
|
|
2576
|
-
method: "POST",
|
|
2577
|
-
body: { event: params.event, data: params.data }
|
|
2578
|
-
});
|
|
2579
|
-
}
|
|
2580
2558
|
};
|
|
2581
2559
|
|
|
2582
2560
|
// src/resources/observability.ts
|
|
@@ -2585,15 +2563,15 @@ var Observability = class extends BaseResource {
|
|
|
2585
2563
|
super(options);
|
|
2586
2564
|
}
|
|
2587
2565
|
/**
|
|
2588
|
-
* Retrieves a specific
|
|
2566
|
+
* Retrieves a specific trace by ID
|
|
2589
2567
|
* @param traceId - ID of the trace to retrieve
|
|
2590
|
-
* @returns Promise containing the
|
|
2568
|
+
* @returns Promise containing the trace with all its spans
|
|
2591
2569
|
*/
|
|
2592
2570
|
getTrace(traceId) {
|
|
2593
2571
|
return this.request(`/api/observability/traces/${traceId}`);
|
|
2594
2572
|
}
|
|
2595
2573
|
/**
|
|
2596
|
-
* Retrieves paginated list of
|
|
2574
|
+
* Retrieves paginated list of traces with optional filtering
|
|
2597
2575
|
* @param params - Parameters for pagination and filtering
|
|
2598
2576
|
* @returns Promise containing paginated traces and pagination info
|
|
2599
2577
|
*/
|
|
@@ -2695,6 +2673,7 @@ var MastraClient = class extends BaseResource {
|
|
|
2695
2673
|
listMemoryThreads(params) {
|
|
2696
2674
|
const queryParams = new URLSearchParams({
|
|
2697
2675
|
resourceId: params.resourceId,
|
|
2676
|
+
resourceid: params.resourceId,
|
|
2698
2677
|
agentId: params.agentId,
|
|
2699
2678
|
...params.page !== void 0 && { page: params.page.toString() },
|
|
2700
2679
|
...params.perPage !== void 0 && { perPage: params.perPage.toString() },
|
|
@@ -3137,10 +3116,10 @@ var MastraClient = class extends BaseResource {
|
|
|
3137
3116
|
body: params
|
|
3138
3117
|
});
|
|
3139
3118
|
}
|
|
3140
|
-
|
|
3119
|
+
getTrace(traceId) {
|
|
3141
3120
|
return this.observability.getTrace(traceId);
|
|
3142
3121
|
}
|
|
3143
|
-
|
|
3122
|
+
getTraces(params) {
|
|
3144
3123
|
return this.observability.getTraces(params);
|
|
3145
3124
|
}
|
|
3146
3125
|
listScoresBySpan(params) {
|