@mastra/client-js 0.13.1 → 0.13.2-alpha.2

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
@@ -2940,6 +2940,14 @@ var MastraClient = class extends BaseResource {
2940
2940
  getMemoryThreads(params) {
2941
2941
  return this.request(`/api/memory/threads?resourceid=${params.resourceId}&agentId=${params.agentId}`);
2942
2942
  }
2943
+ /**
2944
+ * Retrieves memory config for a resource
2945
+ * @param params - Parameters containing the resource ID
2946
+ * @returns Promise containing array of memory threads
2947
+ */
2948
+ getMemoryConfig(params) {
2949
+ return this.request(`/api/memory/config?agentId=${params.agentId}`);
2950
+ }
2943
2951
  /**
2944
2952
  * Creates a new memory thread
2945
2953
  * @param params - Parameters for creating the memory thread
@@ -2956,6 +2964,24 @@ var MastraClient = class extends BaseResource {
2956
2964
  getMemoryThread(threadId, agentId) {
2957
2965
  return new MemoryThread(this.options, threadId, agentId);
2958
2966
  }
2967
+ getThreadMessages(threadId, opts = {}) {
2968
+ let url = "";
2969
+ if (opts.agentId) {
2970
+ url = `/api/memory/threads/${threadId}/messages?agentId=${opts.agentId}`;
2971
+ } else if (opts.networkId) {
2972
+ url = `/api/memory/network/threads/${threadId}/messages?networkId=${opts.networkId}`;
2973
+ }
2974
+ return this.request(url);
2975
+ }
2976
+ deleteThread(threadId, opts = {}) {
2977
+ let url = "";
2978
+ if (opts.agentId) {
2979
+ url = `/api/memory/threads/${threadId}?agentId=${opts.agentId}`;
2980
+ } else if (opts.networkId) {
2981
+ url = `/api/memory/network/threads/${threadId}?networkId=${opts.networkId}`;
2982
+ }
2983
+ return this.request(url, { method: "DELETE" });
2984
+ }
2959
2985
  /**
2960
2986
  * Saves messages to memory
2961
2987
  * @param params - Parameters containing messages to save