@mastra/client-js 0.0.0-main-test-05-11-2025-2-20251105223343 → 0.0.0-main-test-05-11-2025-2-20251106011400
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 +4 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2670,7 +2670,7 @@ var MastraClient = class extends BaseResource {
|
|
|
2670
2670
|
* @param params - Parameters containing resource ID, pagination options, and optional request context
|
|
2671
2671
|
* @returns Promise containing paginated array of memory threads with metadata
|
|
2672
2672
|
*/
|
|
2673
|
-
listMemoryThreads(params) {
|
|
2673
|
+
async listMemoryThreads(params) {
|
|
2674
2674
|
const queryParams = new URLSearchParams({
|
|
2675
2675
|
resourceId: params.resourceId,
|
|
2676
2676
|
resourceid: params.resourceId,
|
|
@@ -2680,9 +2680,17 @@ var MastraClient = class extends BaseResource {
|
|
|
2680
2680
|
...params.orderBy && { orderBy: params.orderBy },
|
|
2681
2681
|
...params.sortDirection && { sortDirection: params.sortDirection }
|
|
2682
2682
|
});
|
|
2683
|
-
|
|
2683
|
+
const response = await this.request(
|
|
2684
2684
|
`/api/memory/threads?${queryParams.toString()}${requestContextQueryString(params.requestContext, "&")}`
|
|
2685
2685
|
);
|
|
2686
|
+
const actualResponse = "threads" in response ? response : {
|
|
2687
|
+
threads: response,
|
|
2688
|
+
total: response.length,
|
|
2689
|
+
page: params.page ?? 0,
|
|
2690
|
+
perPage: params.perPage ?? 100,
|
|
2691
|
+
hasMore: false
|
|
2692
|
+
};
|
|
2693
|
+
return actualResponse;
|
|
2686
2694
|
}
|
|
2687
2695
|
/**
|
|
2688
2696
|
* Retrieves memory config for a resource
|