@pairsystems/goodmem-client 1.0.0-beta.1 → 1.0.0-dev.cb052d6

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.
Files changed (61) hide show
  1. package/README.md +100 -82
  2. package/dist/ApiClient.js +33 -52
  3. package/dist/api/APIKeysApi.js +72 -51
  4. package/dist/api/EmbeddersApi.js +93 -63
  5. package/dist/api/MemoriesApi.js +263 -80
  6. package/dist/api/RerankersApi.js +262 -0
  7. package/dist/api/SpacesApi.js +100 -66
  8. package/dist/api/SystemApi.js +24 -18
  9. package/dist/api/UsersApi.js +100 -26
  10. package/dist/client.js +26 -1
  11. package/dist/index.js +181 -0
  12. package/dist/model/AbstractReply.js +138 -0
  13. package/dist/model/ApiKeyResponse.js +5 -5
  14. package/dist/model/BatchMemoryCreationRequest.js +5 -5
  15. package/dist/model/BatchMemoryDeletionRequest.js +5 -5
  16. package/dist/model/BatchMemoryRetrievalRequest.js +5 -5
  17. package/dist/model/BinaryContent.js +129 -0
  18. package/dist/model/ChunkReference.js +152 -0
  19. package/dist/model/ChunkingConfiguration.js +115 -0
  20. package/dist/model/ContextItem.js +136 -0
  21. package/dist/model/CreateApiKeyRequest.js +5 -5
  22. package/dist/model/CreateApiKeyResponse.js +5 -5
  23. package/dist/model/DistributionType.js +58 -0
  24. package/dist/model/EmbedderCreationRequest.js +20 -9
  25. package/dist/model/EmbedderResponse.js +20 -9
  26. package/dist/model/EmbedderWeight.js +125 -0
  27. package/dist/model/GoodMemStatus.js +129 -0
  28. package/dist/model/LengthMeasurement.js +63 -0
  29. package/dist/model/ListApiKeysResponse.js +5 -5
  30. package/dist/model/ListEmbeddersResponse.js +5 -5
  31. package/dist/model/ListRerankersResponse.js +132 -0
  32. package/dist/model/ListSpacesResponse.js +5 -5
  33. package/dist/model/Memory.js +23 -15
  34. package/dist/model/MemoryChunkResponse.js +240 -0
  35. package/dist/model/MemoryCreationRequest.js +21 -9
  36. package/dist/model/MemoryListResponse.js +5 -5
  37. package/dist/model/Modality.js +4 -4
  38. package/dist/model/PostProcessor.js +125 -0
  39. package/dist/model/ProviderType.js +9 -4
  40. package/dist/model/RecursiveChunkingConfiguration.js +165 -0
  41. package/dist/model/RerankerCreationRequest.js +266 -0
  42. package/dist/model/RerankerResponse.js +316 -0
  43. package/dist/model/ResultSetBoundary.js +153 -0
  44. package/dist/model/RetrieveMemoryEvent.js +148 -0
  45. package/dist/model/RetrieveMemoryRequest.js +219 -0
  46. package/dist/model/RetrievedItem.js +106 -0
  47. package/dist/model/SentenceChunkingConfiguration.js +141 -0
  48. package/dist/model/SeparatorKeepStrategy.js +63 -0
  49. package/dist/model/Space.js +19 -5
  50. package/dist/model/SpaceCreationRequest.js +19 -5
  51. package/dist/model/SpaceEmbedder.js +5 -5
  52. package/dist/model/SpaceEmbedderConfig.js +5 -5
  53. package/dist/model/SpaceKey.js +145 -0
  54. package/dist/model/SystemInitResponse.js +5 -5
  55. package/dist/model/UpdateApiKeyRequest.js +5 -5
  56. package/dist/model/UpdateEmbedderRequest.js +5 -5
  57. package/dist/model/UpdateRerankerRequest.js +226 -0
  58. package/dist/model/UpdateSpaceRequest.js +22 -44
  59. package/dist/model/UserResponse.js +5 -5
  60. package/dist/streaming.js +649 -0
  61. package/package.json +4 -36
@@ -11,6 +11,8 @@ var _BatchMemoryRetrievalRequest = _interopRequireDefault(require("../model/Batc
11
11
  var _Memory = _interopRequireDefault(require("../model/Memory"));
12
12
  var _MemoryCreationRequest = _interopRequireDefault(require("../model/MemoryCreationRequest"));
13
13
  var _MemoryListResponse = _interopRequireDefault(require("../model/MemoryListResponse"));
14
+ var _RetrieveMemoryEvent = _interopRequireDefault(require("../model/RetrieveMemoryEvent"));
15
+ var _RetrieveMemoryRequest = _interopRequireDefault(require("../model/RetrieveMemoryRequest"));
14
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
17
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
16
18
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -18,11 +20,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
18
20
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
22
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
21
- * GoodMem API
22
- * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
23
+ *
24
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
23
25
  *
24
- * The version of the OpenAPI document: v1
25
- * Contact: support@goodmem.io
26
+ * The version of the OpenAPI document:
27
+ *
26
28
  *
27
29
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
30
  * https://openapi-generator.tech
@@ -32,7 +34,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
32
34
  /**
33
35
  * Memories service.
34
36
  * @module api/MemoriesApi
35
- * @version v1
37
+ * @version 1.0.0
36
38
  */
37
39
  var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
38
40
  /**
@@ -47,23 +49,15 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
47
49
  this.apiClient = apiClient || _ApiClient["default"].instance;
48
50
  }
49
51
 
50
- /**
51
- * Callback function to receive the result of the batchCreateMemory operation.
52
- * @callback module:api/MemoriesApi~batchCreateMemoryCallback
53
- * @param {String} error Error message, if any.
54
- * @param data This operation does not return a value.
55
- * @param {String} response The complete HTTP response.
56
- */
57
-
58
52
  /**
59
53
  * Create multiple memories in a batch
60
54
  * Creates multiple memories in a single operation, with individual success/failure results.
61
55
  * @param {module:model/BatchMemoryCreationRequest} batchMemoryCreationRequest Batch memory creation details
62
- * @param {module:api/MemoriesApi~batchCreateMemoryCallback} callback The callback function, accepting three arguments: error, data, response
56
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
63
57
  */
64
58
  return _createClass(MemoriesApi, [{
65
- key: "batchCreateMemory",
66
- value: function batchCreateMemory(batchMemoryCreationRequest, callback) {
59
+ key: "batchCreateMemoryWithHttpInfo",
60
+ value: function batchCreateMemoryWithHttpInfo(batchMemoryCreationRequest) {
67
61
  var postBody = batchMemoryCreationRequest;
68
62
  // verify the required parameter 'batchMemoryCreationRequest' is set
69
63
  if (batchMemoryCreationRequest === undefined || batchMemoryCreationRequest === null) {
@@ -77,26 +71,32 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
77
71
  var contentTypes = ['application/json'];
78
72
  var accepts = ['application/json'];
79
73
  var returnType = null;
80
- return this.apiClient.callApi('/v1/memories/batch', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
74
+ return this.apiClient.callApi('/v1/memories/batch', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
81
75
  }
82
76
 
83
77
  /**
84
- * Callback function to receive the result of the batchDeleteMemory operation.
85
- * @callback module:api/MemoriesApi~batchDeleteMemoryCallback
86
- * @param {String} error Error message, if any.
87
- * @param data This operation does not return a value.
88
- * @param {String} response The complete HTTP response.
78
+ * Create multiple memories in a batch
79
+ * Creates multiple memories in a single operation, with individual success/failure results.
80
+ * @param {module:model/BatchMemoryCreationRequest} batchMemoryCreationRequest Batch memory creation details
81
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
89
82
  */
83
+ }, {
84
+ key: "batchCreateMemory",
85
+ value: function batchCreateMemory(batchMemoryCreationRequest) {
86
+ return this.batchCreateMemoryWithHttpInfo(batchMemoryCreationRequest).then(function (response_and_data) {
87
+ return response_and_data.data;
88
+ });
89
+ }
90
90
 
91
91
  /**
92
92
  * Delete multiple memories by ID
93
93
  * Deletes multiple memories in a single operation, with success/failure results for each ID.
94
94
  * @param {module:model/BatchMemoryDeletionRequest} batchMemoryDeletionRequest Batch memory deletion details
95
- * @param {module:api/MemoriesApi~batchDeleteMemoryCallback} callback The callback function, accepting three arguments: error, data, response
95
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
96
96
  */
97
97
  }, {
98
- key: "batchDeleteMemory",
99
- value: function batchDeleteMemory(batchMemoryDeletionRequest, callback) {
98
+ key: "batchDeleteMemoryWithHttpInfo",
99
+ value: function batchDeleteMemoryWithHttpInfo(batchMemoryDeletionRequest) {
100
100
  var postBody = batchMemoryDeletionRequest;
101
101
  // verify the required parameter 'batchMemoryDeletionRequest' is set
102
102
  if (batchMemoryDeletionRequest === undefined || batchMemoryDeletionRequest === null) {
@@ -110,26 +110,32 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
110
110
  var contentTypes = ['application/json'];
111
111
  var accepts = ['application/json'];
112
112
  var returnType = null;
113
- return this.apiClient.callApi('/v1/memories/batch/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
113
+ return this.apiClient.callApi('/v1/memories/batch/delete', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
114
114
  }
115
115
 
116
116
  /**
117
- * Callback function to receive the result of the batchGetMemory operation.
118
- * @callback module:api/MemoriesApi~batchGetMemoryCallback
119
- * @param {String} error Error message, if any.
120
- * @param data This operation does not return a value.
121
- * @param {String} response The complete HTTP response.
117
+ * Delete multiple memories by ID
118
+ * Deletes multiple memories in a single operation, with success/failure results for each ID.
119
+ * @param {module:model/BatchMemoryDeletionRequest} batchMemoryDeletionRequest Batch memory deletion details
120
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
122
121
  */
122
+ }, {
123
+ key: "batchDeleteMemory",
124
+ value: function batchDeleteMemory(batchMemoryDeletionRequest) {
125
+ return this.batchDeleteMemoryWithHttpInfo(batchMemoryDeletionRequest).then(function (response_and_data) {
126
+ return response_and_data.data;
127
+ });
128
+ }
123
129
 
124
130
  /**
125
131
  * Get multiple memories by ID
126
132
  * Retrieves multiple memories in a single operation, with individual success/failure results.
127
133
  * @param {module:model/BatchMemoryRetrievalRequest} batchMemoryRetrievalRequest Batch memory retrieval details
128
- * @param {module:api/MemoriesApi~batchGetMemoryCallback} callback The callback function, accepting three arguments: error, data, response
134
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
129
135
  */
130
136
  }, {
131
- key: "batchGetMemory",
132
- value: function batchGetMemory(batchMemoryRetrievalRequest, callback) {
137
+ key: "batchGetMemoryWithHttpInfo",
138
+ value: function batchGetMemoryWithHttpInfo(batchMemoryRetrievalRequest) {
133
139
  var postBody = batchMemoryRetrievalRequest;
134
140
  // verify the required parameter 'batchMemoryRetrievalRequest' is set
135
141
  if (batchMemoryRetrievalRequest === undefined || batchMemoryRetrievalRequest === null) {
@@ -143,27 +149,32 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
143
149
  var contentTypes = ['application/json'];
144
150
  var accepts = ['application/json'];
145
151
  var returnType = null;
146
- return this.apiClient.callApi('/v1/memories/batch/get', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
152
+ return this.apiClient.callApi('/v1/memories/batch/get', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
147
153
  }
148
154
 
149
155
  /**
150
- * Callback function to receive the result of the createMemory operation.
151
- * @callback module:api/MemoriesApi~createMemoryCallback
152
- * @param {String} error Error message, if any.
153
- * @param {module:model/Memory} data The data returned by the service call.
154
- * @param {String} response The complete HTTP response.
156
+ * Get multiple memories by ID
157
+ * Retrieves multiple memories in a single operation, with individual success/failure results.
158
+ * @param {module:model/BatchMemoryRetrievalRequest} batchMemoryRetrievalRequest Batch memory retrieval details
159
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
155
160
  */
161
+ }, {
162
+ key: "batchGetMemory",
163
+ value: function batchGetMemory(batchMemoryRetrievalRequest) {
164
+ return this.batchGetMemoryWithHttpInfo(batchMemoryRetrievalRequest).then(function (response_and_data) {
165
+ return response_and_data.data;
166
+ });
167
+ }
156
168
 
157
169
  /**
158
170
  * Create a new memory
159
- * Creates a new memory with the provided content reference, metadata, and space assignment.
171
+ * Creates a new memory in a specified space and starts asynchronous processing. The memory begins in PENDING status while a background job performs chunking and embedding generation. IMPORTANT: This operation is NOT idempotent - each request creates a new memory record. Returns INVALID_ARGUMENT if space_id, original_content, or content_type is missing or invalid. Returns NOT_FOUND if the specified space does not exist. Requires CREATE_MEMORY_OWN permission for spaces you own (or CREATE_MEMORY_ANY for admin users to create in any space). Side effects include creating the memory record, generating a unique UUID, and enqueuing a background processing job.
160
172
  * @param {module:model/MemoryCreationRequest} memoryCreationRequest Memory creation details
161
- * @param {module:api/MemoriesApi~createMemoryCallback} callback The callback function, accepting three arguments: error, data, response
162
- * data is of type: {@link module:model/Memory}
173
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Memory} and HTTP response
163
174
  */
164
175
  }, {
165
- key: "createMemory",
166
- value: function createMemory(memoryCreationRequest, callback) {
176
+ key: "createMemoryWithHttpInfo",
177
+ value: function createMemoryWithHttpInfo(memoryCreationRequest) {
167
178
  var postBody = memoryCreationRequest;
168
179
  // verify the required parameter 'memoryCreationRequest' is set
169
180
  if (memoryCreationRequest === undefined || memoryCreationRequest === null) {
@@ -177,26 +188,32 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
177
188
  var contentTypes = ['application/json'];
178
189
  var accepts = ['application/json'];
179
190
  var returnType = _Memory["default"];
180
- return this.apiClient.callApi('/v1/memories', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
191
+ return this.apiClient.callApi('/v1/memories', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
181
192
  }
182
193
 
183
194
  /**
184
- * Callback function to receive the result of the deleteMemory operation.
185
- * @callback module:api/MemoriesApi~deleteMemoryCallback
186
- * @param {String} error Error message, if any.
187
- * @param data This operation does not return a value.
188
- * @param {String} response The complete HTTP response.
195
+ * Create a new memory
196
+ * Creates a new memory in a specified space and starts asynchronous processing. The memory begins in PENDING status while a background job performs chunking and embedding generation. IMPORTANT: This operation is NOT idempotent - each request creates a new memory record. Returns INVALID_ARGUMENT if space_id, original_content, or content_type is missing or invalid. Returns NOT_FOUND if the specified space does not exist. Requires CREATE_MEMORY_OWN permission for spaces you own (or CREATE_MEMORY_ANY for admin users to create in any space). Side effects include creating the memory record, generating a unique UUID, and enqueuing a background processing job.
197
+ * @param {module:model/MemoryCreationRequest} memoryCreationRequest Memory creation details
198
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Memory}
189
199
  */
200
+ }, {
201
+ key: "createMemory",
202
+ value: function createMemory(memoryCreationRequest) {
203
+ return this.createMemoryWithHttpInfo(memoryCreationRequest).then(function (response_and_data) {
204
+ return response_and_data.data;
205
+ });
206
+ }
190
207
 
191
208
  /**
192
209
  * Delete a memory
193
- * Deletes a memory. This operation cannot be undone.
210
+ * Permanently deletes a memory and its associated chunks. This operation cannot be undone and immediately removes the memory record from the database. IDEMPOTENCY: This operation is safe to retry - may return NOT_FOUND if the memory was already deleted or never existed. Requires DELETE_MEMORY_OWN permission for memories in spaces you own (or DELETE_MEMORY_ANY for admin users to delete any memory). Side effects include permanent removal of the memory record and all associated chunk data.
194
211
  * @param {String} id The unique identifier of the memory to delete
195
- * @param {module:api/MemoriesApi~deleteMemoryCallback} callback The callback function, accepting three arguments: error, data, response
212
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
196
213
  */
197
214
  }, {
198
- key: "deleteMemory",
199
- value: function deleteMemory(id, callback) {
215
+ key: "deleteMemoryWithHttpInfo",
216
+ value: function deleteMemoryWithHttpInfo(id) {
200
217
  var postBody = null;
201
218
  // verify the required parameter 'id' is set
202
219
  if (id === undefined || id === null) {
@@ -212,27 +229,35 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
212
229
  var contentTypes = [];
213
230
  var accepts = [];
214
231
  var returnType = null;
215
- return this.apiClient.callApi('/v1/memories/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
232
+ return this.apiClient.callApi('/v1/memories/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
216
233
  }
217
234
 
218
235
  /**
219
- * Callback function to receive the result of the getMemory operation.
220
- * @callback module:api/MemoriesApi~getMemoryCallback
221
- * @param {String} error Error message, if any.
222
- * @param {module:model/Memory} data The data returned by the service call.
223
- * @param {String} response The complete HTTP response.
236
+ * Delete a memory
237
+ * Permanently deletes a memory and its associated chunks. This operation cannot be undone and immediately removes the memory record from the database. IDEMPOTENCY: This operation is safe to retry - may return NOT_FOUND if the memory was already deleted or never existed. Requires DELETE_MEMORY_OWN permission for memories in spaces you own (or DELETE_MEMORY_ANY for admin users to delete any memory). Side effects include permanent removal of the memory record and all associated chunk data.
238
+ * @param {String} id The unique identifier of the memory to delete
239
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
224
240
  */
241
+ }, {
242
+ key: "deleteMemory",
243
+ value: function deleteMemory(id) {
244
+ return this.deleteMemoryWithHttpInfo(id).then(function (response_and_data) {
245
+ return response_and_data.data;
246
+ });
247
+ }
225
248
 
226
249
  /**
227
250
  * Get a memory by ID
228
- * Retrieves a specific memory by its unique identifier.
251
+ * Retrieves a single memory by its ID. PERMISSION CLARIFICATION: With READ_MEMORY_OWN permission, access is granted if you own the parent space OR if the parent space is public (public_read=true). With READ_MEMORY_ANY permission, you can access any memory regardless of ownership. This is a read-only operation with no side effects and is safe to retry. Returns NOT_FOUND if the memory or its parent space does not exist.
229
252
  * @param {String} id The unique identifier of the memory to retrieve
230
- * @param {module:api/MemoriesApi~getMemoryCallback} callback The callback function, accepting three arguments: error, data, response
231
- * data is of type: {@link module:model/Memory}
253
+ * @param {Object} opts Optional parameters
254
+ * @param {Boolean} [includeContent] Whether to include the original content in the response (defaults to false)
255
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Memory} and HTTP response
232
256
  */
233
257
  }, {
234
- key: "getMemory",
235
- value: function getMemory(id, callback) {
258
+ key: "getMemoryWithHttpInfo",
259
+ value: function getMemoryWithHttpInfo(id, opts) {
260
+ opts = opts || {};
236
261
  var postBody = null;
237
262
  // verify the required parameter 'id' is set
238
263
  if (id === undefined || id === null) {
@@ -241,34 +266,51 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
241
266
  var pathParams = {
242
267
  'id': id
243
268
  };
244
- var queryParams = {};
269
+ var queryParams = {
270
+ 'includeContent': opts['includeContent']
271
+ };
245
272
  var headerParams = {};
246
273
  var formParams = {};
247
274
  var authNames = [];
248
275
  var contentTypes = [];
249
276
  var accepts = ['application/json'];
250
277
  var returnType = _Memory["default"];
251
- return this.apiClient.callApi('/v1/memories/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
278
+ return this.apiClient.callApi('/v1/memories/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
252
279
  }
253
280
 
254
281
  /**
255
- * Callback function to receive the result of the listMemories operation.
256
- * @callback module:api/MemoriesApi~listMemoriesCallback
257
- * @param {String} error Error message, if any.
258
- * @param {module:model/MemoryListResponse} data The data returned by the service call.
259
- * @param {String} response The complete HTTP response.
282
+ * Get a memory by ID
283
+ * Retrieves a single memory by its ID. PERMISSION CLARIFICATION: With READ_MEMORY_OWN permission, access is granted if you own the parent space OR if the parent space is public (public_read=true). With READ_MEMORY_ANY permission, you can access any memory regardless of ownership. This is a read-only operation with no side effects and is safe to retry. Returns NOT_FOUND if the memory or its parent space does not exist.
284
+ * @param {String} id The unique identifier of the memory to retrieve
285
+ * @param {Object} opts Optional parameters
286
+ * @param {Boolean} opts.includeContent Whether to include the original content in the response (defaults to false)
287
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Memory}
260
288
  */
289
+ }, {
290
+ key: "getMemory",
291
+ value: function getMemory(id, opts) {
292
+ return this.getMemoryWithHttpInfo(id, opts).then(function (response_and_data) {
293
+ return response_and_data.data;
294
+ });
295
+ }
261
296
 
262
297
  /**
263
298
  * List memories in a space
264
- * Retrieves a list of memories contained within a specific space.
299
+ * Lists all memories within a given space. CRITICAL: The current server implementation does NOT support pagination - the max_results and next_token parameters are IGNORED and all matching memories are returned. This is a read-only operation with no side effects and is safe to retry. Requires LIST_MEMORY_OWN or LIST_MEMORY_ANY permission. Returns NOT_FOUND if the specified space does not exist.
265
300
  * @param {String} spaceId The unique identifier of the space containing the memories
266
- * @param {module:api/MemoriesApi~listMemoriesCallback} callback The callback function, accepting three arguments: error, data, response
267
- * data is of type: {@link module:model/MemoryListResponse}
301
+ * @param {Object} opts Optional parameters
302
+ * @param {Boolean} [includeContent] Whether to include the original content in the response (defaults to false)
303
+ * @param {String} [statusFilter] Filter memories by processing status (PENDING, PROCESSING, COMPLETED, FAILED)
304
+ * @param {Number} [maxResults] IGNORED: The current server implementation does not support pagination for this endpoint. This parameter is documented for future compatibility but will be ignored.
305
+ * @param {String} [nextToken] IGNORED: The current server implementation does not support pagination for this endpoint. This parameter is documented for future compatibility but will be ignored.
306
+ * @param {String} [sortBy] Field to sort by (e.g., 'created_at')
307
+ * @param {String} [sortOrder] Sort direction (ASCENDING or DESCENDING)
308
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryListResponse} and HTTP response
268
309
  */
269
310
  }, {
270
- key: "listMemories",
271
- value: function listMemories(spaceId, callback) {
311
+ key: "listMemoriesWithHttpInfo",
312
+ value: function listMemoriesWithHttpInfo(spaceId, opts) {
313
+ opts = opts || {};
272
314
  var postBody = null;
273
315
  // verify the required parameter 'spaceId' is set
274
316
  if (spaceId === undefined || spaceId === null) {
@@ -277,14 +319,155 @@ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
277
319
  var pathParams = {
278
320
  'spaceId': spaceId
279
321
  };
280
- var queryParams = {};
322
+ var queryParams = {
323
+ 'includeContent': opts['includeContent'],
324
+ 'statusFilter': opts['statusFilter'],
325
+ 'maxResults': opts['maxResults'],
326
+ 'nextToken': opts['nextToken'],
327
+ 'sortBy': opts['sortBy'],
328
+ 'sortOrder': opts['sortOrder']
329
+ };
281
330
  var headerParams = {};
282
331
  var formParams = {};
283
332
  var authNames = [];
284
333
  var contentTypes = [];
285
334
  var accepts = ['application/json'];
286
335
  var returnType = _MemoryListResponse["default"];
287
- return this.apiClient.callApi('/v1/spaces/{spaceId}/memories', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
336
+ return this.apiClient.callApi('/v1/spaces/{spaceId}/memories', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
337
+ }
338
+
339
+ /**
340
+ * List memories in a space
341
+ * Lists all memories within a given space. CRITICAL: The current server implementation does NOT support pagination - the max_results and next_token parameters are IGNORED and all matching memories are returned. This is a read-only operation with no side effects and is safe to retry. Requires LIST_MEMORY_OWN or LIST_MEMORY_ANY permission. Returns NOT_FOUND if the specified space does not exist.
342
+ * @param {String} spaceId The unique identifier of the space containing the memories
343
+ * @param {Object} opts Optional parameters
344
+ * @param {Boolean} opts.includeContent Whether to include the original content in the response (defaults to false)
345
+ * @param {String} opts.statusFilter Filter memories by processing status (PENDING, PROCESSING, COMPLETED, FAILED)
346
+ * @param {Number} opts.maxResults IGNORED: The current server implementation does not support pagination for this endpoint. This parameter is documented for future compatibility but will be ignored.
347
+ * @param {String} opts.nextToken IGNORED: The current server implementation does not support pagination for this endpoint. This parameter is documented for future compatibility but will be ignored.
348
+ * @param {String} opts.sortBy Field to sort by (e.g., 'created_at')
349
+ * @param {String} opts.sortOrder Sort direction (ASCENDING or DESCENDING)
350
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryListResponse}
351
+ */
352
+ }, {
353
+ key: "listMemories",
354
+ value: function listMemories(spaceId, opts) {
355
+ return this.listMemoriesWithHttpInfo(spaceId, opts).then(function (response_and_data) {
356
+ return response_and_data.data;
357
+ });
358
+ }
359
+
360
+ /**
361
+ * Stream semantic memory retrieval
362
+ * Streams semantic retrieval results based on query and context. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
363
+ * @param {String} message Primary query/message for semantic search
364
+ * @param {Object} opts Optional parameters
365
+ * @param {String} [spaceIds] Comma-separated list of space UUIDs to search within
366
+ * @param {Number} [requestedSize] Maximum number of memories to retrieve
367
+ * @param {Boolean} [fetchMemory] Whether to fetch memory definitions (defaults to true)
368
+ * @param {Boolean} [fetchMemoryContent] Whether to fetch original content for memories (defaults to false)
369
+ * @param {String} [ppRerankerId] UUID of reranker to use for ChatPostProcessor (enables post-processing)
370
+ * @param {String} [ppLlmId] UUID of LLM to use for ChatPostProcessor generation
371
+ * @param {Number} [ppRelevanceThreshold] Minimum relevance score for ChatPostProcessor (default: 0.5)
372
+ * @param {Number} [ppLlmTemp] LLM temperature for ChatPostProcessor generation (default: 0.3)
373
+ * @param {Number} [ppMaxResults] Maximum results for ChatPostProcessor (default: 10)
374
+ * @param {Boolean} [ppChronologicalResort] Whether ChatPostProcessor should resort by creation time (default: true)
375
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RetrieveMemoryEvent} and HTTP response
376
+ */
377
+ }, {
378
+ key: "retrieveMemoryWithHttpInfo",
379
+ value: function retrieveMemoryWithHttpInfo(message, opts) {
380
+ opts = opts || {};
381
+ var postBody = null;
382
+ // verify the required parameter 'message' is set
383
+ if (message === undefined || message === null) {
384
+ throw new Error("Missing the required parameter 'message' when calling retrieveMemory");
385
+ }
386
+ var pathParams = {};
387
+ var queryParams = {
388
+ 'message': message,
389
+ 'spaceIds': opts['spaceIds'],
390
+ 'requestedSize': opts['requestedSize'],
391
+ 'fetchMemory': opts['fetchMemory'],
392
+ 'fetchMemoryContent': opts['fetchMemoryContent'],
393
+ 'pp_reranker_id': opts['ppRerankerId'],
394
+ 'pp_llm_id': opts['ppLlmId'],
395
+ 'pp_relevance_threshold': opts['ppRelevanceThreshold'],
396
+ 'pp_llm_temp': opts['ppLlmTemp'],
397
+ 'pp_max_results': opts['ppMaxResults'],
398
+ 'pp_chronological_resort': opts['ppChronologicalResort']
399
+ };
400
+ var headerParams = {};
401
+ var formParams = {};
402
+ var authNames = [];
403
+ var contentTypes = [];
404
+ var accepts = ['application/json'];
405
+ var returnType = _RetrieveMemoryEvent["default"];
406
+ return this.apiClient.callApi('/v1/memories/retrieve', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
407
+ }
408
+
409
+ /**
410
+ * Stream semantic memory retrieval
411
+ * Streams semantic retrieval results based on query and context. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
412
+ * @param {String} message Primary query/message for semantic search
413
+ * @param {Object} opts Optional parameters
414
+ * @param {String} opts.spaceIds Comma-separated list of space UUIDs to search within
415
+ * @param {Number} opts.requestedSize Maximum number of memories to retrieve
416
+ * @param {Boolean} opts.fetchMemory Whether to fetch memory definitions (defaults to true)
417
+ * @param {Boolean} opts.fetchMemoryContent Whether to fetch original content for memories (defaults to false)
418
+ * @param {String} opts.ppRerankerId UUID of reranker to use for ChatPostProcessor (enables post-processing)
419
+ * @param {String} opts.ppLlmId UUID of LLM to use for ChatPostProcessor generation
420
+ * @param {Number} opts.ppRelevanceThreshold Minimum relevance score for ChatPostProcessor (default: 0.5)
421
+ * @param {Number} opts.ppLlmTemp LLM temperature for ChatPostProcessor generation (default: 0.3)
422
+ * @param {Number} opts.ppMaxResults Maximum results for ChatPostProcessor (default: 10)
423
+ * @param {Boolean} opts.ppChronologicalResort Whether ChatPostProcessor should resort by creation time (default: true)
424
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RetrieveMemoryEvent}
425
+ */
426
+ }, {
427
+ key: "retrieveMemory",
428
+ value: function retrieveMemory(message, opts) {
429
+ return this.retrieveMemoryWithHttpInfo(message, opts).then(function (response_and_data) {
430
+ return response_and_data.data;
431
+ });
432
+ }
433
+
434
+ /**
435
+ * Advanced semantic memory retrieval with JSON
436
+ * Streams semantic retrieval results with full feature support including context items and embedder weight overrides. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
437
+ * @param {module:model/RetrieveMemoryRequest} retrieveMemoryRequest Request body with query, context, and space configurations
438
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
439
+ */
440
+ }, {
441
+ key: "retrieveMemoryAdvancedWithHttpInfo",
442
+ value: function retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest) {
443
+ var postBody = retrieveMemoryRequest;
444
+ // verify the required parameter 'retrieveMemoryRequest' is set
445
+ if (retrieveMemoryRequest === undefined || retrieveMemoryRequest === null) {
446
+ throw new Error("Missing the required parameter 'retrieveMemoryRequest' when calling retrieveMemoryAdvanced");
447
+ }
448
+ var pathParams = {};
449
+ var queryParams = {};
450
+ var headerParams = {};
451
+ var formParams = {};
452
+ var authNames = [];
453
+ var contentTypes = ['application/json'];
454
+ var accepts = ['application/x-ndjson', 'text/event-stream'];
455
+ var returnType = null;
456
+ return this.apiClient.callApi('/v1/memories/retrieve', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
457
+ }
458
+
459
+ /**
460
+ * Advanced semantic memory retrieval with JSON
461
+ * Streams semantic retrieval results with full feature support including context items and embedder weight overrides. Supports SSE (text/event-stream) and NDJSON (application/x-ndjson) formats.
462
+ * @param {module:model/RetrieveMemoryRequest} retrieveMemoryRequest Request body with query, context, and space configurations
463
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
464
+ */
465
+ }, {
466
+ key: "retrieveMemoryAdvanced",
467
+ value: function retrieveMemoryAdvanced(retrieveMemoryRequest) {
468
+ return this.retrieveMemoryAdvancedWithHttpInfo(retrieveMemoryRequest).then(function (response_and_data) {
469
+ return response_and_data.data;
470
+ });
288
471
  }
289
472
  }]);
290
473
  }();