@mastra/client-js 0.0.0-main-test-05-11-2025-2-20251105214713 → 0.0.0-main-test-05-11-2025-2-20251105233020

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
@@ -2563,15 +2563,15 @@ var Observability = class extends BaseResource {
2563
2563
  super(options);
2564
2564
  }
2565
2565
  /**
2566
- * Retrieves a specific AI trace by ID
2566
+ * Retrieves a specific trace by ID
2567
2567
  * @param traceId - ID of the trace to retrieve
2568
- * @returns Promise containing the AI trace with all its spans
2568
+ * @returns Promise containing the trace with all its spans
2569
2569
  */
2570
2570
  getTrace(traceId) {
2571
2571
  return this.request(`/api/observability/traces/${traceId}`);
2572
2572
  }
2573
2573
  /**
2574
- * Retrieves paginated list of AI traces with optional filtering
2574
+ * Retrieves paginated list of traces with optional filtering
2575
2575
  * @param params - Parameters for pagination and filtering
2576
2576
  * @returns Promise containing paginated traces and pagination info
2577
2577
  */
@@ -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
- return this.request(
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
@@ -3116,10 +3124,10 @@ var MastraClient = class extends BaseResource {
3116
3124
  body: params
3117
3125
  });
3118
3126
  }
3119
- getAITrace(traceId) {
3127
+ getTrace(traceId) {
3120
3128
  return this.observability.getTrace(traceId);
3121
3129
  }
3122
- getAITraces(params) {
3130
+ getTraces(params) {
3123
3131
  return this.observability.getTraces(params);
3124
3132
  }
3125
3133
  listScoresBySpan(params) {