@pairsystems/goodmem-client 1.0.0-beta.1

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 (36) hide show
  1. package/README.md +200 -0
  2. package/dist/ApiClient.js +718 -0
  3. package/dist/api/APIKeysApi.js +188 -0
  4. package/dist/api/EmbeddersApi.js +232 -0
  5. package/dist/api/MemoriesApi.js +290 -0
  6. package/dist/api/SpacesApi.js +240 -0
  7. package/dist/api/SystemApi.js +77 -0
  8. package/dist/api/UsersApi.js +86 -0
  9. package/dist/client.js +150 -0
  10. package/dist/index.js +230 -0
  11. package/dist/model/ApiKeyResponse.js +203 -0
  12. package/dist/model/BatchMemoryCreationRequest.js +140 -0
  13. package/dist/model/BatchMemoryDeletionRequest.js +122 -0
  14. package/dist/model/BatchMemoryRetrievalRequest.js +131 -0
  15. package/dist/model/CreateApiKeyRequest.js +98 -0
  16. package/dist/model/CreateApiKeyResponse.js +105 -0
  17. package/dist/model/EmbedderCreationRequest.js +288 -0
  18. package/dist/model/EmbedderResponse.js +336 -0
  19. package/dist/model/ListApiKeysResponse.js +112 -0
  20. package/dist/model/ListEmbeddersResponse.js +132 -0
  21. package/dist/model/ListSpacesResponse.js +125 -0
  22. package/dist/model/Memory.js +248 -0
  23. package/dist/model/MemoryCreationRequest.js +187 -0
  24. package/dist/model/MemoryListResponse.js +145 -0
  25. package/dist/model/Modality.js +68 -0
  26. package/dist/model/ProviderType.js +63 -0
  27. package/dist/model/Space.js +251 -0
  28. package/dist/model/SpaceCreationRequest.js +178 -0
  29. package/dist/model/SpaceEmbedder.js +192 -0
  30. package/dist/model/SpaceEmbedderConfig.js +125 -0
  31. package/dist/model/SystemInitResponse.js +151 -0
  32. package/dist/model/UpdateApiKeyRequest.js +121 -0
  33. package/dist/model/UpdateEmbedderRequest.js +244 -0
  34. package/dist/model/UpdateSpaceRequest.js +166 -0
  35. package/dist/model/UserResponse.js +179 -0
  36. package/package.json +78 -0
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _BatchMemoryCreationRequest = _interopRequireDefault(require("../model/BatchMemoryCreationRequest"));
9
+ var _BatchMemoryDeletionRequest = _interopRequireDefault(require("../model/BatchMemoryDeletionRequest"));
10
+ var _BatchMemoryRetrievalRequest = _interopRequireDefault(require("../model/BatchMemoryRetrievalRequest"));
11
+ var _Memory = _interopRequireDefault(require("../model/Memory"));
12
+ var _MemoryCreationRequest = _interopRequireDefault(require("../model/MemoryCreationRequest"));
13
+ var _MemoryListResponse = _interopRequireDefault(require("../model/MemoryListResponse"));
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
+ 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
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ 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
+ * The version of the OpenAPI document: v1
25
+ * Contact: support@goodmem.io
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * Memories service.
34
+ * @module api/MemoriesApi
35
+ * @version v1
36
+ */
37
+ var MemoriesApi = exports["default"] = /*#__PURE__*/function () {
38
+ /**
39
+ * Constructs a new MemoriesApi.
40
+ * @alias module:api/MemoriesApi
41
+ * @class
42
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
43
+ * default to {@link module:ApiClient#instance} if unspecified.
44
+ */
45
+ function MemoriesApi(apiClient) {
46
+ _classCallCheck(this, MemoriesApi);
47
+ this.apiClient = apiClient || _ApiClient["default"].instance;
48
+ }
49
+
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
+ /**
59
+ * Create multiple memories in a batch
60
+ * Creates multiple memories in a single operation, with individual success/failure results.
61
+ * @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
63
+ */
64
+ return _createClass(MemoriesApi, [{
65
+ key: "batchCreateMemory",
66
+ value: function batchCreateMemory(batchMemoryCreationRequest, callback) {
67
+ var postBody = batchMemoryCreationRequest;
68
+ // verify the required parameter 'batchMemoryCreationRequest' is set
69
+ if (batchMemoryCreationRequest === undefined || batchMemoryCreationRequest === null) {
70
+ throw new Error("Missing the required parameter 'batchMemoryCreationRequest' when calling batchCreateMemory");
71
+ }
72
+ var pathParams = {};
73
+ var queryParams = {};
74
+ var headerParams = {};
75
+ var formParams = {};
76
+ var authNames = [];
77
+ var contentTypes = ['application/json'];
78
+ var accepts = ['application/json'];
79
+ var returnType = null;
80
+ return this.apiClient.callApi('/v1/memories/batch', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
81
+ }
82
+
83
+ /**
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.
89
+ */
90
+
91
+ /**
92
+ * Delete multiple memories by ID
93
+ * Deletes multiple memories in a single operation, with success/failure results for each ID.
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
96
+ */
97
+ }, {
98
+ key: "batchDeleteMemory",
99
+ value: function batchDeleteMemory(batchMemoryDeletionRequest, callback) {
100
+ var postBody = batchMemoryDeletionRequest;
101
+ // verify the required parameter 'batchMemoryDeletionRequest' is set
102
+ if (batchMemoryDeletionRequest === undefined || batchMemoryDeletionRequest === null) {
103
+ throw new Error("Missing the required parameter 'batchMemoryDeletionRequest' when calling batchDeleteMemory");
104
+ }
105
+ var pathParams = {};
106
+ var queryParams = {};
107
+ var headerParams = {};
108
+ var formParams = {};
109
+ var authNames = [];
110
+ var contentTypes = ['application/json'];
111
+ var accepts = ['application/json'];
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);
114
+ }
115
+
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.
122
+ */
123
+
124
+ /**
125
+ * Get multiple memories by ID
126
+ * Retrieves multiple memories in a single operation, with individual success/failure results.
127
+ * @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
129
+ */
130
+ }, {
131
+ key: "batchGetMemory",
132
+ value: function batchGetMemory(batchMemoryRetrievalRequest, callback) {
133
+ var postBody = batchMemoryRetrievalRequest;
134
+ // verify the required parameter 'batchMemoryRetrievalRequest' is set
135
+ if (batchMemoryRetrievalRequest === undefined || batchMemoryRetrievalRequest === null) {
136
+ throw new Error("Missing the required parameter 'batchMemoryRetrievalRequest' when calling batchGetMemory");
137
+ }
138
+ var pathParams = {};
139
+ var queryParams = {};
140
+ var headerParams = {};
141
+ var formParams = {};
142
+ var authNames = [];
143
+ var contentTypes = ['application/json'];
144
+ var accepts = ['application/json'];
145
+ var returnType = null;
146
+ return this.apiClient.callApi('/v1/memories/batch/get', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
147
+ }
148
+
149
+ /**
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.
155
+ */
156
+
157
+ /**
158
+ * Create a new memory
159
+ * Creates a new memory with the provided content reference, metadata, and space assignment.
160
+ * @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}
163
+ */
164
+ }, {
165
+ key: "createMemory",
166
+ value: function createMemory(memoryCreationRequest, callback) {
167
+ var postBody = memoryCreationRequest;
168
+ // verify the required parameter 'memoryCreationRequest' is set
169
+ if (memoryCreationRequest === undefined || memoryCreationRequest === null) {
170
+ throw new Error("Missing the required parameter 'memoryCreationRequest' when calling createMemory");
171
+ }
172
+ var pathParams = {};
173
+ var queryParams = {};
174
+ var headerParams = {};
175
+ var formParams = {};
176
+ var authNames = [];
177
+ var contentTypes = ['application/json'];
178
+ var accepts = ['application/json'];
179
+ var returnType = _Memory["default"];
180
+ return this.apiClient.callApi('/v1/memories', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
181
+ }
182
+
183
+ /**
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.
189
+ */
190
+
191
+ /**
192
+ * Delete a memory
193
+ * Deletes a memory. This operation cannot be undone.
194
+ * @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
196
+ */
197
+ }, {
198
+ key: "deleteMemory",
199
+ value: function deleteMemory(id, callback) {
200
+ var postBody = null;
201
+ // verify the required parameter 'id' is set
202
+ if (id === undefined || id === null) {
203
+ throw new Error("Missing the required parameter 'id' when calling deleteMemory");
204
+ }
205
+ var pathParams = {
206
+ 'id': id
207
+ };
208
+ var queryParams = {};
209
+ var headerParams = {};
210
+ var formParams = {};
211
+ var authNames = [];
212
+ var contentTypes = [];
213
+ var accepts = [];
214
+ var returnType = null;
215
+ return this.apiClient.callApi('/v1/memories/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
216
+ }
217
+
218
+ /**
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.
224
+ */
225
+
226
+ /**
227
+ * Get a memory by ID
228
+ * Retrieves a specific memory by its unique identifier.
229
+ * @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}
232
+ */
233
+ }, {
234
+ key: "getMemory",
235
+ value: function getMemory(id, callback) {
236
+ var postBody = null;
237
+ // verify the required parameter 'id' is set
238
+ if (id === undefined || id === null) {
239
+ throw new Error("Missing the required parameter 'id' when calling getMemory");
240
+ }
241
+ var pathParams = {
242
+ 'id': id
243
+ };
244
+ var queryParams = {};
245
+ var headerParams = {};
246
+ var formParams = {};
247
+ var authNames = [];
248
+ var contentTypes = [];
249
+ var accepts = ['application/json'];
250
+ var returnType = _Memory["default"];
251
+ return this.apiClient.callApi('/v1/memories/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
252
+ }
253
+
254
+ /**
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.
260
+ */
261
+
262
+ /**
263
+ * List memories in a space
264
+ * Retrieves a list of memories contained within a specific space.
265
+ * @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}
268
+ */
269
+ }, {
270
+ key: "listMemories",
271
+ value: function listMemories(spaceId, callback) {
272
+ var postBody = null;
273
+ // verify the required parameter 'spaceId' is set
274
+ if (spaceId === undefined || spaceId === null) {
275
+ throw new Error("Missing the required parameter 'spaceId' when calling listMemories");
276
+ }
277
+ var pathParams = {
278
+ 'spaceId': spaceId
279
+ };
280
+ var queryParams = {};
281
+ var headerParams = {};
282
+ var formParams = {};
283
+ var authNames = [];
284
+ var contentTypes = [];
285
+ var accepts = ['application/json'];
286
+ 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);
288
+ }
289
+ }]);
290
+ }();
@@ -0,0 +1,240 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _ListSpacesResponse = _interopRequireDefault(require("../model/ListSpacesResponse"));
9
+ var _Space = _interopRequireDefault(require("../model/Space"));
10
+ var _SpaceCreationRequest = _interopRequireDefault(require("../model/SpaceCreationRequest"));
11
+ var _UpdateSpaceRequest = _interopRequireDefault(require("../model/UpdateSpaceRequest"));
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
+ 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); }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * GoodMem API
20
+ * 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.
21
+ *
22
+ * The version of the OpenAPI document: v1
23
+ * Contact: support@goodmem.io
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * Spaces service.
32
+ * @module api/SpacesApi
33
+ * @version v1
34
+ */
35
+ var SpacesApi = exports["default"] = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new SpacesApi.
38
+ * @alias module:api/SpacesApi
39
+ * @class
40
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
41
+ * default to {@link module:ApiClient#instance} if unspecified.
42
+ */
43
+ function SpacesApi(apiClient) {
44
+ _classCallCheck(this, SpacesApi);
45
+ this.apiClient = apiClient || _ApiClient["default"].instance;
46
+ }
47
+
48
+ /**
49
+ * Callback function to receive the result of the createSpace operation.
50
+ * @callback module:api/SpacesApi~createSpaceCallback
51
+ * @param {String} error Error message, if any.
52
+ * @param {module:model/Space} data The data returned by the service call.
53
+ * @param {String} response The complete HTTP response.
54
+ */
55
+
56
+ /**
57
+ * Create a new Space
58
+ * Creates a new space with the provided name, labels, and embedder configuration. A space is a container for organizing related memories.
59
+ * @param {module:model/SpaceCreationRequest} spaceCreationRequest Space configuration details
60
+ * @param {module:api/SpacesApi~createSpaceCallback} callback The callback function, accepting three arguments: error, data, response
61
+ * data is of type: {@link module:model/Space}
62
+ */
63
+ return _createClass(SpacesApi, [{
64
+ key: "createSpace",
65
+ value: function createSpace(spaceCreationRequest, callback) {
66
+ var postBody = spaceCreationRequest;
67
+ // verify the required parameter 'spaceCreationRequest' is set
68
+ if (spaceCreationRequest === undefined || spaceCreationRequest === null) {
69
+ throw new Error("Missing the required parameter 'spaceCreationRequest' when calling createSpace");
70
+ }
71
+ var pathParams = {};
72
+ var queryParams = {};
73
+ var headerParams = {};
74
+ var formParams = {};
75
+ var authNames = [];
76
+ var contentTypes = ['application/json'];
77
+ var accepts = ['application/json'];
78
+ var returnType = _Space["default"];
79
+ return this.apiClient.callApi('/v1/spaces', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
80
+ }
81
+
82
+ /**
83
+ * Callback function to receive the result of the deleteSpace operation.
84
+ * @callback module:api/SpacesApi~deleteSpaceCallback
85
+ * @param {String} error Error message, if any.
86
+ * @param data This operation does not return a value.
87
+ * @param {String} response The complete HTTP response.
88
+ */
89
+
90
+ /**
91
+ * Delete a space
92
+ * Deletes a space and all memories contained within it. This operation cannot be undone.
93
+ * @param {String} id The unique identifier of the space to delete
94
+ * @param {module:api/SpacesApi~deleteSpaceCallback} callback The callback function, accepting three arguments: error, data, response
95
+ */
96
+ }, {
97
+ key: "deleteSpace",
98
+ value: function deleteSpace(id, callback) {
99
+ var postBody = null;
100
+ // verify the required parameter 'id' is set
101
+ if (id === undefined || id === null) {
102
+ throw new Error("Missing the required parameter 'id' when calling deleteSpace");
103
+ }
104
+ var pathParams = {
105
+ 'id': id
106
+ };
107
+ var queryParams = {};
108
+ var headerParams = {};
109
+ var formParams = {};
110
+ var authNames = [];
111
+ var contentTypes = [];
112
+ var accepts = [];
113
+ var returnType = null;
114
+ return this.apiClient.callApi('/v1/spaces/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
115
+ }
116
+
117
+ /**
118
+ * Callback function to receive the result of the getSpace operation.
119
+ * @callback module:api/SpacesApi~getSpaceCallback
120
+ * @param {String} error Error message, if any.
121
+ * @param {module:model/Space} data The data returned by the service call.
122
+ * @param {String} response The complete HTTP response.
123
+ */
124
+
125
+ /**
126
+ * Get a space by ID
127
+ * Retrieves a specific space by its unique identifier. Returns the complete space information, including name, labels, embedder configuration, and metadata.
128
+ * @param {String} id The unique identifier of the space to retrieve
129
+ * @param {module:api/SpacesApi~getSpaceCallback} callback The callback function, accepting three arguments: error, data, response
130
+ * data is of type: {@link module:model/Space}
131
+ */
132
+ }, {
133
+ key: "getSpace",
134
+ value: function getSpace(id, callback) {
135
+ var postBody = null;
136
+ // verify the required parameter 'id' is set
137
+ if (id === undefined || id === null) {
138
+ throw new Error("Missing the required parameter 'id' when calling getSpace");
139
+ }
140
+ var pathParams = {
141
+ 'id': id
142
+ };
143
+ var queryParams = {};
144
+ var headerParams = {};
145
+ var formParams = {};
146
+ var authNames = [];
147
+ var contentTypes = [];
148
+ var accepts = ['application/json'];
149
+ var returnType = _Space["default"];
150
+ return this.apiClient.callApi('/v1/spaces/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
151
+ }
152
+
153
+ /**
154
+ * Callback function to receive the result of the listSpaces operation.
155
+ * @callback module:api/SpacesApi~listSpacesCallback
156
+ * @param {String} error Error message, if any.
157
+ * @param {module:model/ListSpacesResponse} data The data returned by the service call.
158
+ * @param {String} response The complete HTTP response.
159
+ */
160
+
161
+ /**
162
+ * List spaces
163
+ * Retrieves a list of spaces accessible to the caller, with optional filtering by owner, labels, and name. Results are paginated with a maximum number of spaces per response.
164
+ * @param {Object} opts Optional parameters
165
+ * @param {String} [ownerId] Filter spaces by owner ID. If not provided, shows spaces based on permissions.
166
+ * @param {String} [nameFilter] Filter spaces by name using glob pattern matching
167
+ * @param {Number} [maxResults] Maximum number of results to return in a single page
168
+ * @param {String} [nextToken] Pagination token for retrieving the next set of results
169
+ * @param {String} [sortBy] Field to sort by. Supported values: \"created_time\", \"name\", \"updated_time\"
170
+ * @param {String} [sortOrder] Sort order (ASCENDING or DESCENDING)
171
+ * @param {String} [label] Filter by label value. Multiple label filters can be specified (e.g., ?label.project=AI&label.team=NLP)
172
+ * @param {module:api/SpacesApi~listSpacesCallback} callback The callback function, accepting three arguments: error, data, response
173
+ * data is of type: {@link module:model/ListSpacesResponse}
174
+ */
175
+ }, {
176
+ key: "listSpaces",
177
+ value: function listSpaces(opts, callback) {
178
+ opts = opts || {};
179
+ var postBody = null;
180
+ var pathParams = {};
181
+ var queryParams = {
182
+ 'owner_id': opts['ownerId'],
183
+ 'name_filter': opts['nameFilter'],
184
+ 'max_results': opts['maxResults'],
185
+ 'next_token': opts['nextToken'],
186
+ 'sort_by': opts['sortBy'],
187
+ 'sort_order': opts['sortOrder'],
188
+ 'label.*': opts['label']
189
+ };
190
+ var headerParams = {};
191
+ var formParams = {};
192
+ var authNames = [];
193
+ var contentTypes = [];
194
+ var accepts = ['application/json'];
195
+ var returnType = _ListSpacesResponse["default"];
196
+ return this.apiClient.callApi('/v1/spaces', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
197
+ }
198
+
199
+ /**
200
+ * Callback function to receive the result of the updateSpace operation.
201
+ * @callback module:api/SpacesApi~updateSpaceCallback
202
+ * @param {String} error Error message, if any.
203
+ * @param {module:model/Space} data The data returned by the service call.
204
+ * @param {String} response The complete HTTP response.
205
+ */
206
+
207
+ /**
208
+ * Update a space
209
+ * Updates an existing space with new values for the specified fields. Fields not included in the request remain unchanged.
210
+ * @param {String} id The unique identifier of the space to update
211
+ * @param {module:model/UpdateSpaceRequest} updateSpaceRequest Space update details
212
+ * @param {module:api/SpacesApi~updateSpaceCallback} callback The callback function, accepting three arguments: error, data, response
213
+ * data is of type: {@link module:model/Space}
214
+ */
215
+ }, {
216
+ key: "updateSpace",
217
+ value: function updateSpace(id, updateSpaceRequest, callback) {
218
+ var postBody = updateSpaceRequest;
219
+ // verify the required parameter 'id' is set
220
+ if (id === undefined || id === null) {
221
+ throw new Error("Missing the required parameter 'id' when calling updateSpace");
222
+ }
223
+ // verify the required parameter 'updateSpaceRequest' is set
224
+ if (updateSpaceRequest === undefined || updateSpaceRequest === null) {
225
+ throw new Error("Missing the required parameter 'updateSpaceRequest' when calling updateSpace");
226
+ }
227
+ var pathParams = {
228
+ 'id': id
229
+ };
230
+ var queryParams = {};
231
+ var headerParams = {};
232
+ var formParams = {};
233
+ var authNames = [];
234
+ var contentTypes = ['application/json'];
235
+ var accepts = ['application/json'];
236
+ var returnType = _Space["default"];
237
+ return this.apiClient.callApi('/v1/spaces/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
238
+ }
239
+ }]);
240
+ }();
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _SystemInitResponse = _interopRequireDefault(require("../model/SystemInitResponse"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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); }
11
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
15
+ 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); } /**
16
+ * GoodMem API
17
+ * 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.
18
+ *
19
+ * The version of the OpenAPI document: v1
20
+ * Contact: support@goodmem.io
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * System service.
29
+ * @module api/SystemApi
30
+ * @version v1
31
+ */
32
+ var SystemApi = exports["default"] = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new SystemApi.
35
+ * @alias module:api/SystemApi
36
+ * @class
37
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
38
+ * default to {@link module:ApiClient#instance} if unspecified.
39
+ */
40
+ function SystemApi(apiClient) {
41
+ _classCallCheck(this, SystemApi);
42
+ this.apiClient = apiClient || _ApiClient["default"].instance;
43
+ }
44
+
45
+ /**
46
+ * Callback function to receive the result of the initializeSystem operation.
47
+ * @callback module:api/SystemApi~initializeSystemCallback
48
+ * @param {String} error Error message, if any.
49
+ * @param {module:model/SystemInitResponse} data The data returned by the service call.
50
+ * @param {String} response The complete HTTP response.
51
+ */
52
+
53
+ /**
54
+ * Initialize the system
55
+ * Initializes the system by creating a root user and API key. This endpoint should only be called once during first-time setup. If the system is already initialized, the endpoint will return a success response without creating new credentials.
56
+ * @param {Object} opts Optional parameters
57
+ * @param {Object.<String, Object>} [body] Empty request body - no parameters required
58
+ * @param {module:api/SystemApi~initializeSystemCallback} callback The callback function, accepting three arguments: error, data, response
59
+ * data is of type: {@link module:model/SystemInitResponse}
60
+ */
61
+ return _createClass(SystemApi, [{
62
+ key: "initializeSystem",
63
+ value: function initializeSystem(opts, callback) {
64
+ opts = opts || {};
65
+ var postBody = opts['body'];
66
+ var pathParams = {};
67
+ var queryParams = {};
68
+ var headerParams = {};
69
+ var formParams = {};
70
+ var authNames = [];
71
+ var contentTypes = ['application/json'];
72
+ var accepts = ['application/json'];
73
+ var returnType = _SystemInitResponse["default"];
74
+ return this.apiClient.callApi('/v1/system/init', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
75
+ }
76
+ }]);
77
+ }();