@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
package/README.md CHANGED
@@ -1,14 +1,13 @@
1
- # goodmem-client
1
+ # @pairsystems/goodmem-client
2
2
 
3
- GoodmemClient - JavaScript client for goodmem-client
4
- 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.
3
+ GoodMemClient - JavaScript client for @pairsystems/goodmem-client
4
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
5
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
6
6
 
7
- - API version: v1
8
- - Package version: v1
9
- - Generator version: 7.13.0
7
+ - API version:
8
+ - Package version: 1.0.0
9
+ - Generator version: 7.16.0-SNAPSHOT
10
10
  - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
11
- For more information, please visit [https://goodmem.io/support](https://goodmem.io/support)
12
11
 
13
12
  ## Installation
14
13
 
@@ -21,7 +20,7 @@ To publish the library as a [npm](https://www.npmjs.com/), please follow the pro
21
20
  Then install it via:
22
21
 
23
22
  ```shell
24
- npm install goodmem-client --save
23
+ npm install @pairsystems/goodmem-client --save
25
24
  ```
26
25
 
27
26
  Finally, you need to build the module:
@@ -44,7 +43,7 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow
44
43
  npm link
45
44
  ```
46
45
 
47
- To use the link you just defined in your project, switch to the directory you want to use your goodmem-client from, and run:
46
+ To use the link you just defined in your project, switch to the directory you want to use your @pairsystems/goodmem-client from, and run:
48
47
 
49
48
  ```shell
50
49
  npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
@@ -58,11 +57,11 @@ npm run build
58
57
 
59
58
  #### git
60
59
 
61
- If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
60
+ If the library is hosted at a git repository, e.g.https://github.com/PAIR-Systems-Inc/goodmem/clients/js
62
61
  then install it via:
63
62
 
64
63
  ```shell
65
- npm install GIT_USER_ID/GIT_REPO_ID --save
64
+ npm install PAIR-Systems-Inc/goodmem/clients/js --save
66
65
  ```
67
66
 
68
67
  ### For browser
@@ -100,10 +99,10 @@ module: {
100
99
  Please follow the [installation](#installation) instruction and execute the following JS code:
101
100
 
102
101
  ```javascript
103
- var GoodmemClient = require('goodmem-client');
102
+ var GoodMemClient = require('@pairsystems/goodmem-client');
104
103
 
105
104
 
106
- var api = new GoodmemClient.APIKeysApi()
105
+ var api = new GoodMemClient.APIKeysApi()
107
106
  var createApiKeyRequest = {
108
107
  "labels": {
109
108
  "environment": "development",
@@ -112,89 +111,108 @@ var createApiKeyRequest = {
112
111
  "expiresAt": 1735689600000
113
112
  }
114
113
  ; // {CreateApiKeyRequest} API key configuration
115
- var callback = function(error, data, response) {
116
- if (error) {
117
- console.error(error);
118
- } else {
119
- console.log('API called successfully. Returned data: ' + data);
120
- }
121
- };
122
- api.createApiKey(createApiKeyRequest, callback);
114
+ api.createApiKey(createApiKeyRequest).then(function(data) {
115
+ console.log('API called successfully. Returned data: ' + data);
116
+ }, function(error) {
117
+ console.error(error);
118
+ });
119
+
123
120
 
124
121
  ```
125
122
 
126
123
  ## Documentation for API Endpoints
127
124
 
128
- All URIs are relative to *http://localhost:8080/v1/default*
125
+ All URIs are relative to *http://localhost*
129
126
 
130
127
  Class | Method | HTTP request | Description
131
128
  ------------ | ------------- | ------------- | -------------
132
- *GoodmemClient.APIKeysApi* | [**createApiKey**](docs/APIKeysApi.md#createApiKey) | **POST** /v1/apikeys | Create a new API key
133
- *GoodmemClient.APIKeysApi* | [**deleteApiKey**](docs/APIKeysApi.md#deleteApiKey) | **DELETE** /v1/apikeys/{id} | Delete an API key
134
- *GoodmemClient.APIKeysApi* | [**listApiKeys**](docs/APIKeysApi.md#listApiKeys) | **GET** /v1/apikeys | List API keys
135
- *GoodmemClient.APIKeysApi* | [**updateApiKey**](docs/APIKeysApi.md#updateApiKey) | **PUT** /v1/apikeys/{id} | Update an API key
136
- *GoodmemClient.EmbeddersApi* | [**createEmbedder**](docs/EmbeddersApi.md#createEmbedder) | **POST** /v1/embedders | Create a new embedder
137
- *GoodmemClient.EmbeddersApi* | [**deleteEmbedder**](docs/EmbeddersApi.md#deleteEmbedder) | **DELETE** /v1/embedders/{id} | Delete an embedder
138
- *GoodmemClient.EmbeddersApi* | [**getEmbedder**](docs/EmbeddersApi.md#getEmbedder) | **GET** /v1/embedders/{id} | Get an embedder by ID
139
- *GoodmemClient.EmbeddersApi* | [**listEmbedders**](docs/EmbeddersApi.md#listEmbedders) | **GET** /v1/embedders | List embedders
140
- *GoodmemClient.EmbeddersApi* | [**updateEmbedder**](docs/EmbeddersApi.md#updateEmbedder) | **PUT** /v1/embedders/{id} | Update an embedder
141
- *GoodmemClient.MemoriesApi* | [**batchCreateMemory**](docs/MemoriesApi.md#batchCreateMemory) | **POST** /v1/memories/batch | Create multiple memories in a batch
142
- *GoodmemClient.MemoriesApi* | [**batchDeleteMemory**](docs/MemoriesApi.md#batchDeleteMemory) | **POST** /v1/memories/batch/delete | Delete multiple memories by ID
143
- *GoodmemClient.MemoriesApi* | [**batchGetMemory**](docs/MemoriesApi.md#batchGetMemory) | **POST** /v1/memories/batch/get | Get multiple memories by ID
144
- *GoodmemClient.MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /v1/memories | Create a new memory
145
- *GoodmemClient.MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /v1/memories/{id} | Delete a memory
146
- *GoodmemClient.MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /v1/memories/{id} | Get a memory by ID
147
- *GoodmemClient.MemoriesApi* | [**listMemories**](docs/MemoriesApi.md#listMemories) | **GET** /v1/spaces/{spaceId}/memories | List memories in a space
148
- *GoodmemClient.SpacesApi* | [**createSpace**](docs/SpacesApi.md#createSpace) | **POST** /v1/spaces | Create a new Space
149
- *GoodmemClient.SpacesApi* | [**deleteSpace**](docs/SpacesApi.md#deleteSpace) | **DELETE** /v1/spaces/{id} | Delete a space
150
- *GoodmemClient.SpacesApi* | [**getSpace**](docs/SpacesApi.md#getSpace) | **GET** /v1/spaces/{id} | Get a space by ID
151
- *GoodmemClient.SpacesApi* | [**listSpaces**](docs/SpacesApi.md#listSpaces) | **GET** /v1/spaces | List spaces
152
- *GoodmemClient.SpacesApi* | [**updateSpace**](docs/SpacesApi.md#updateSpace) | **PUT** /v1/spaces/{id} | Update a space
153
- *GoodmemClient.SystemApi* | [**initializeSystem**](docs/SystemApi.md#initializeSystem) | **POST** /v1/system/init | Initialize the system
154
- *GoodmemClient.UsersApi* | [**getUser**](docs/UsersApi.md#getUser) | **GET** /v1/users/{id} | Get a user by ID
129
+ *GoodMemClient.APIKeysApi* | [**createApiKey**](docs/APIKeysApi.md#createApiKey) | **POST** /v1/apikeys | Create a new API key
130
+ *GoodMemClient.APIKeysApi* | [**deleteApiKey**](docs/APIKeysApi.md#deleteApiKey) | **DELETE** /v1/apikeys/{id} | Delete an API key
131
+ *GoodMemClient.APIKeysApi* | [**listApiKeys**](docs/APIKeysApi.md#listApiKeys) | **GET** /v1/apikeys | List API keys
132
+ *GoodMemClient.APIKeysApi* | [**updateApiKey**](docs/APIKeysApi.md#updateApiKey) | **PUT** /v1/apikeys/{id} | Update an API key
133
+ *GoodMemClient.EmbeddersApi* | [**createEmbedder**](docs/EmbeddersApi.md#createEmbedder) | **POST** /v1/embedders | Create a new embedder
134
+ *GoodMemClient.EmbeddersApi* | [**deleteEmbedder**](docs/EmbeddersApi.md#deleteEmbedder) | **DELETE** /v1/embedders/{id} | Delete an embedder
135
+ *GoodMemClient.EmbeddersApi* | [**getEmbedder**](docs/EmbeddersApi.md#getEmbedder) | **GET** /v1/embedders/{id} | Get an embedder by ID
136
+ *GoodMemClient.EmbeddersApi* | [**listEmbedders**](docs/EmbeddersApi.md#listEmbedders) | **GET** /v1/embedders | List embedders
137
+ *GoodMemClient.EmbeddersApi* | [**updateEmbedder**](docs/EmbeddersApi.md#updateEmbedder) | **PUT** /v1/embedders/{id} | Update an embedder
138
+ *GoodMemClient.MemoriesApi* | [**batchCreateMemory**](docs/MemoriesApi.md#batchCreateMemory) | **POST** /v1/memories/batch | Create multiple memories in a batch
139
+ *GoodMemClient.MemoriesApi* | [**batchDeleteMemory**](docs/MemoriesApi.md#batchDeleteMemory) | **POST** /v1/memories/batch/delete | Delete multiple memories by ID
140
+ *GoodMemClient.MemoriesApi* | [**batchGetMemory**](docs/MemoriesApi.md#batchGetMemory) | **POST** /v1/memories/batch/get | Get multiple memories by ID
141
+ *GoodMemClient.MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /v1/memories | Create a new memory
142
+ *GoodMemClient.MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /v1/memories/{id} | Delete a memory
143
+ *GoodMemClient.MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /v1/memories/{id} | Get a memory by ID
144
+ *GoodMemClient.MemoriesApi* | [**listMemories**](docs/MemoriesApi.md#listMemories) | **GET** /v1/spaces/{spaceId}/memories | List memories in a space
145
+ *GoodMemClient.MemoriesApi* | [**retrieveMemory**](docs/MemoriesApi.md#retrieveMemory) | **GET** /v1/memories/retrieve | Stream semantic memory retrieval
146
+ *GoodMemClient.MemoriesApi* | [**retrieveMemoryAdvanced**](docs/MemoriesApi.md#retrieveMemoryAdvanced) | **POST** /v1/memories/retrieve | Advanced semantic memory retrieval with JSON
147
+ *GoodMemClient.RerankersApi* | [**createReranker**](docs/RerankersApi.md#createReranker) | **POST** /v1/rerankers | Create a new reranker
148
+ *GoodMemClient.RerankersApi* | [**deleteReranker**](docs/RerankersApi.md#deleteReranker) | **DELETE** /v1/rerankers/{id} | Delete a reranker
149
+ *GoodMemClient.RerankersApi* | [**getReranker**](docs/RerankersApi.md#getReranker) | **GET** /v1/rerankers/{id} | Get a reranker by ID
150
+ *GoodMemClient.RerankersApi* | [**listRerankers**](docs/RerankersApi.md#listRerankers) | **GET** /v1/rerankers | List rerankers
151
+ *GoodMemClient.RerankersApi* | [**updateReranker**](docs/RerankersApi.md#updateReranker) | **PUT** /v1/rerankers/{id} | Update a reranker
152
+ *GoodMemClient.SpacesApi* | [**createSpace**](docs/SpacesApi.md#createSpace) | **POST** /v1/spaces | Create a new Space
153
+ *GoodMemClient.SpacesApi* | [**deleteSpace**](docs/SpacesApi.md#deleteSpace) | **DELETE** /v1/spaces/{id} | Delete a space
154
+ *GoodMemClient.SpacesApi* | [**getSpace**](docs/SpacesApi.md#getSpace) | **GET** /v1/spaces/{id} | Get a space by ID
155
+ *GoodMemClient.SpacesApi* | [**listSpaces**](docs/SpacesApi.md#listSpaces) | **GET** /v1/spaces | List spaces
156
+ *GoodMemClient.SpacesApi* | [**updateSpace**](docs/SpacesApi.md#updateSpace) | **PUT** /v1/spaces/{id} | Update a space
157
+ *GoodMemClient.SystemApi* | [**initializeSystem**](docs/SystemApi.md#initializeSystem) | **POST** /v1/system/init | Initialize the system
158
+ *GoodMemClient.UsersApi* | [**getCurrentUser**](docs/UsersApi.md#getCurrentUser) | **GET** /v1/users/me | Get current user profile
159
+ *GoodMemClient.UsersApi* | [**getUser**](docs/UsersApi.md#getUser) | **GET** /v1/users/{id} | Get a user by ID
160
+ *GoodMemClient.UsersApi* | [**getUserByEmail**](docs/UsersApi.md#getUserByEmail) | **GET** /v1/users/email/{email} | Get user by email address
155
161
 
156
162
 
157
163
  ## Documentation for Models
158
164
 
159
- - [GoodmemClient.ApiKeyResponse](docs/ApiKeyResponse.md)
160
- - [GoodmemClient.BatchMemoryCreationRequest](docs/BatchMemoryCreationRequest.md)
161
- - [GoodmemClient.BatchMemoryDeletionRequest](docs/BatchMemoryDeletionRequest.md)
162
- - [GoodmemClient.BatchMemoryRetrievalRequest](docs/BatchMemoryRetrievalRequest.md)
163
- - [GoodmemClient.CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
164
- - [GoodmemClient.CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
165
- - [GoodmemClient.EmbedderCreationRequest](docs/EmbedderCreationRequest.md)
166
- - [GoodmemClient.EmbedderResponse](docs/EmbedderResponse.md)
167
- - [GoodmemClient.ListApiKeysResponse](docs/ListApiKeysResponse.md)
168
- - [GoodmemClient.ListEmbeddersResponse](docs/ListEmbeddersResponse.md)
169
- - [GoodmemClient.ListSpacesResponse](docs/ListSpacesResponse.md)
170
- - [GoodmemClient.Memory](docs/Memory.md)
171
- - [GoodmemClient.MemoryCreationRequest](docs/MemoryCreationRequest.md)
172
- - [GoodmemClient.MemoryListResponse](docs/MemoryListResponse.md)
173
- - [GoodmemClient.Modality](docs/Modality.md)
174
- - [GoodmemClient.ProviderType](docs/ProviderType.md)
175
- - [GoodmemClient.Space](docs/Space.md)
176
- - [GoodmemClient.SpaceCreationRequest](docs/SpaceCreationRequest.md)
177
- - [GoodmemClient.SpaceEmbedder](docs/SpaceEmbedder.md)
178
- - [GoodmemClient.SpaceEmbedderConfig](docs/SpaceEmbedderConfig.md)
179
- - [GoodmemClient.SystemInitResponse](docs/SystemInitResponse.md)
180
- - [GoodmemClient.UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
181
- - [GoodmemClient.UpdateEmbedderRequest](docs/UpdateEmbedderRequest.md)
182
- - [GoodmemClient.UpdateSpaceRequest](docs/UpdateSpaceRequest.md)
183
- - [GoodmemClient.UserResponse](docs/UserResponse.md)
165
+ - [GoodMemClient.AbstractReply](docs/AbstractReply.md)
166
+ - [GoodMemClient.ApiKeyResponse](docs/ApiKeyResponse.md)
167
+ - [GoodMemClient.BatchMemoryCreationRequest](docs/BatchMemoryCreationRequest.md)
168
+ - [GoodMemClient.BatchMemoryDeletionRequest](docs/BatchMemoryDeletionRequest.md)
169
+ - [GoodMemClient.BatchMemoryRetrievalRequest](docs/BatchMemoryRetrievalRequest.md)
170
+ - [GoodMemClient.BinaryContent](docs/BinaryContent.md)
171
+ - [GoodMemClient.ChunkReference](docs/ChunkReference.md)
172
+ - [GoodMemClient.ChunkingConfiguration](docs/ChunkingConfiguration.md)
173
+ - [GoodMemClient.ContextItem](docs/ContextItem.md)
174
+ - [GoodMemClient.CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
175
+ - [GoodMemClient.CreateApiKeyResponse](docs/CreateApiKeyResponse.md)
176
+ - [GoodMemClient.DistributionType](docs/DistributionType.md)
177
+ - [GoodMemClient.EmbedderCreationRequest](docs/EmbedderCreationRequest.md)
178
+ - [GoodMemClient.EmbedderResponse](docs/EmbedderResponse.md)
179
+ - [GoodMemClient.EmbedderWeight](docs/EmbedderWeight.md)
180
+ - [GoodMemClient.GoodMemStatus](docs/GoodMemStatus.md)
181
+ - [GoodMemClient.LengthMeasurement](docs/LengthMeasurement.md)
182
+ - [GoodMemClient.ListApiKeysResponse](docs/ListApiKeysResponse.md)
183
+ - [GoodMemClient.ListEmbeddersResponse](docs/ListEmbeddersResponse.md)
184
+ - [GoodMemClient.ListRerankersResponse](docs/ListRerankersResponse.md)
185
+ - [GoodMemClient.ListSpacesResponse](docs/ListSpacesResponse.md)
186
+ - [GoodMemClient.Memory](docs/Memory.md)
187
+ - [GoodMemClient.MemoryChunkResponse](docs/MemoryChunkResponse.md)
188
+ - [GoodMemClient.MemoryCreationRequest](docs/MemoryCreationRequest.md)
189
+ - [GoodMemClient.MemoryListResponse](docs/MemoryListResponse.md)
190
+ - [GoodMemClient.Modality](docs/Modality.md)
191
+ - [GoodMemClient.PostProcessor](docs/PostProcessor.md)
192
+ - [GoodMemClient.ProviderType](docs/ProviderType.md)
193
+ - [GoodMemClient.RecursiveChunkingConfiguration](docs/RecursiveChunkingConfiguration.md)
194
+ - [GoodMemClient.RerankerCreationRequest](docs/RerankerCreationRequest.md)
195
+ - [GoodMemClient.RerankerResponse](docs/RerankerResponse.md)
196
+ - [GoodMemClient.ResultSetBoundary](docs/ResultSetBoundary.md)
197
+ - [GoodMemClient.RetrieveMemoryEvent](docs/RetrieveMemoryEvent.md)
198
+ - [GoodMemClient.RetrieveMemoryRequest](docs/RetrieveMemoryRequest.md)
199
+ - [GoodMemClient.RetrievedItem](docs/RetrievedItem.md)
200
+ - [GoodMemClient.SentenceChunkingConfiguration](docs/SentenceChunkingConfiguration.md)
201
+ - [GoodMemClient.SeparatorKeepStrategy](docs/SeparatorKeepStrategy.md)
202
+ - [GoodMemClient.Space](docs/Space.md)
203
+ - [GoodMemClient.SpaceCreationRequest](docs/SpaceCreationRequest.md)
204
+ - [GoodMemClient.SpaceEmbedder](docs/SpaceEmbedder.md)
205
+ - [GoodMemClient.SpaceEmbedderConfig](docs/SpaceEmbedderConfig.md)
206
+ - [GoodMemClient.SpaceKey](docs/SpaceKey.md)
207
+ - [GoodMemClient.SystemInitResponse](docs/SystemInitResponse.md)
208
+ - [GoodMemClient.UpdateApiKeyRequest](docs/UpdateApiKeyRequest.md)
209
+ - [GoodMemClient.UpdateEmbedderRequest](docs/UpdateEmbedderRequest.md)
210
+ - [GoodMemClient.UpdateRerankerRequest](docs/UpdateRerankerRequest.md)
211
+ - [GoodMemClient.UpdateSpaceRequest](docs/UpdateSpaceRequest.md)
212
+ - [GoodMemClient.UserResponse](docs/UserResponse.md)
184
213
 
185
214
 
186
215
  ## Documentation for Authorization
187
216
 
188
-
189
- Authentication schemes defined for the API:
190
- ### BearerAuth
191
-
192
- - **Type**: Bearer authentication
193
-
194
- ### ApiKeyAuth
195
-
196
-
197
- - **Type**: API key
198
- - **API key parameter name**: x-api-key
199
- - **Location**: HTTP header
217
+ Endpoints do not require authorization.
200
218
 
package/dist/ApiClient.js CHANGED
@@ -12,11 +12,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
12
12
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  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); } /**
15
- * GoodMem API
16
- * 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.
15
+ *
16
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17
17
  *
18
- * The version of the OpenAPI document: v1
19
- * Contact: support@goodmem.io
18
+ * The version of the OpenAPI document:
19
+ *
20
20
  *
21
21
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
22
  * https://openapi-generator.tech
@@ -25,7 +25,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
25
25
  */
26
26
  /**
27
27
  * @module ApiClient
28
- * @version v1
28
+ * @version 1.0.0
29
29
  */
30
30
  /**
31
31
  * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
@@ -41,12 +41,12 @@ var ApiClient = /*#__PURE__*/function () {
41
41
  * @param {String} basePath
42
42
  */
43
43
  function ApiClient() {
44
- var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'http://localhost:8080/v1/default';
44
+ var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'http://localhost';
45
45
  _classCallCheck(this, ApiClient);
46
46
  /**
47
47
  * The base URL against which to resolve every API call's (relative) path.
48
48
  * @type {String}
49
- * @default http://localhost:8080/v1/default
49
+ * @default http://localhost
50
50
  */
51
51
  this.basePath = basePath.replace(/\/+$/, '');
52
52
 
@@ -54,16 +54,7 @@ var ApiClient = /*#__PURE__*/function () {
54
54
  * The authentication methods to be included for all API calls.
55
55
  * @type {Array.<String>}
56
56
  */
57
- this.authentications = {
58
- 'BearerAuth': {
59
- type: 'bearer'
60
- },
61
- 'ApiKeyAuth': {
62
- type: 'apiKey',
63
- 'in': 'header',
64
- name: 'x-api-key'
65
- }
66
- };
57
+ this.authentications = {};
67
58
 
68
59
  /**
69
60
  * The default HTTP headers to be included for all API calls.
@@ -71,7 +62,7 @@ var ApiClient = /*#__PURE__*/function () {
71
62
  * @default {}
72
63
  */
73
64
  this.defaultHeaders = {
74
- 'User-Agent': 'OpenAPI-Generator/v1/Javascript'
65
+ 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript'
75
66
  };
76
67
 
77
68
  /**
@@ -381,14 +372,6 @@ var ApiClient = /*#__PURE__*/function () {
381
372
  return ApiClient.convertToType(data, returnType);
382
373
  }
383
374
 
384
- /**
385
- * Callback function to receive the result of the operation.
386
- * @callback module:ApiClient~callApiCallback
387
- * @param {String} error Error message, if any.
388
- * @param data The data returned by the service call.
389
- * @param {String} response The complete HTTP response.
390
- */
391
-
392
375
  /**
393
376
  * Invokes the REST service using the supplied settings and parameters.
394
377
  * @param {String} path The base URL to invoke.
@@ -404,12 +387,11 @@ var ApiClient = /*#__PURE__*/function () {
404
387
  * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
405
388
  * constructor for a complex type.
406
389
  * @param {String} apiBasePath base path defined in the operation/path level to override the default one
407
- * @param {module:ApiClient~callApiCallback} callback The callback function.
408
- * @returns {Object} The SuperAgent request object.
390
+ * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
409
391
  */
410
392
  }, {
411
393
  key: "callApi",
412
- value: function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath, callback) {
394
+ value: function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath) {
413
395
  var _this3 = this;
414
396
  var url = this.buildUrl(path, pathParams, apiBasePath);
415
397
  var request = (0, _superagent["default"])(httpMethod, url);
@@ -494,23 +476,34 @@ var ApiClient = /*#__PURE__*/function () {
494
476
  request.withCredentials();
495
477
  }
496
478
  }
497
- request.end(function (error, response) {
498
- if (callback) {
499
- var data = null;
500
- if (!error) {
479
+ return new Promise(function (resolve, reject) {
480
+ request.end(function (error, response) {
481
+ if (error) {
482
+ var err = {};
483
+ if (response) {
484
+ err.status = response.status;
485
+ err.statusText = response.statusText;
486
+ err.body = response.body;
487
+ err.response = response;
488
+ }
489
+ err.error = error;
490
+ reject(err);
491
+ } else {
501
492
  try {
502
- data = _this3.deserialize(response, returnType);
493
+ var data = _this3.deserialize(response, returnType);
503
494
  if (_this3.enableCookies && typeof window === 'undefined') {
504
495
  _this3.agent._saveCookies(response);
505
496
  }
497
+ resolve({
498
+ data: data,
499
+ response: response
500
+ });
506
501
  } catch (err) {
507
- error = err;
502
+ reject(err);
508
503
  }
509
504
  }
510
- callback(error, data, response);
511
- }
505
+ });
512
506
  });
513
- return request;
514
507
  }
515
508
 
516
509
  /**
@@ -527,20 +520,8 @@ var ApiClient = /*#__PURE__*/function () {
527
520
  */
528
521
  function hostSettings() {
529
522
  return [{
530
- 'url': "http://localhost:{port}{basePath}/default",
531
- 'description': "GoodMem REST API server endpoint",
532
- 'variables': {
533
- port: {
534
- 'description': "Server's REST port",
535
- 'default_value': "8080",
536
- 'enum_values': ["8080"]
537
- },
538
- basePath: {
539
- 'description': "Base path of the API",
540
- 'default_value': "/v1",
541
- 'enum_values': ["", "/v1"]
542
- }
543
- }
523
+ 'url': "",
524
+ 'description': "No description provided"
544
525
  }];
545
526
  }
546
527
  }, {
@@ -17,11 +17,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
17
17
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  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); } /**
20
- * GoodMem API
21
- * 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.
20
+ *
21
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
22
22
  *
23
- * The version of the OpenAPI document: v1
24
- * Contact: support@goodmem.io
23
+ * The version of the OpenAPI document:
24
+ *
25
25
  *
26
26
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
27
  * https://openapi-generator.tech
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * APIKeys service.
33
33
  * @module api/APIKeysApi
34
- * @version v1
34
+ * @version 1.0.0
35
35
  */
36
36
  var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
37
37
  /**
@@ -46,24 +46,15 @@ var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
46
46
  this.apiClient = apiClient || _ApiClient["default"].instance;
47
47
  }
48
48
 
49
- /**
50
- * Callback function to receive the result of the createApiKey operation.
51
- * @callback module:api/APIKeysApi~createApiKeyCallback
52
- * @param {String} error Error message, if any.
53
- * @param {module:model/CreateApiKeyResponse} data The data returned by the service call.
54
- * @param {String} response The complete HTTP response.
55
- */
56
-
57
49
  /**
58
50
  * Create a new API key
59
- * Creates a new API key for authenticating with the API. The response includes the one-time raw API key value which will not be retrievable later.
51
+ * Creates a new API key for authenticating with the API. New keys start in ACTIVE status and can be used immediately for authentication. The response includes the one-time raw API key value which will not be retrievable later - clients must save this value as it cannot be recovered. Requires CREATE_APIKEY_OWN permission (or CREATE_APIKEY_ANY for admin users). Side effects include generating cryptographically secure key material, recording creation timestamp, and tracking creator ID. Returns INVALID_ARGUMENT if expires_at is set to a time in the past.
60
52
  * @param {module:model/CreateApiKeyRequest} createApiKeyRequest API key configuration
61
- * @param {module:api/APIKeysApi~createApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
62
- * data is of type: {@link module:model/CreateApiKeyResponse}
53
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateApiKeyResponse} and HTTP response
63
54
  */
64
55
  return _createClass(APIKeysApi, [{
65
- key: "createApiKey",
66
- value: function createApiKey(createApiKeyRequest, callback) {
56
+ key: "createApiKeyWithHttpInfo",
57
+ value: function createApiKeyWithHttpInfo(createApiKeyRequest) {
67
58
  var postBody = createApiKeyRequest;
68
59
  // verify the required parameter 'createApiKeyRequest' is set
69
60
  if (createApiKeyRequest === undefined || createApiKeyRequest === null) {
@@ -77,26 +68,32 @@ var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
77
68
  var contentTypes = ['application/json'];
78
69
  var accepts = ['application/json'];
79
70
  var returnType = _CreateApiKeyResponse["default"];
80
- return this.apiClient.callApi('/v1/apikeys', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
71
+ return this.apiClient.callApi('/v1/apikeys', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
81
72
  }
82
73
 
83
74
  /**
84
- * Callback function to receive the result of the deleteApiKey operation.
85
- * @callback module:api/APIKeysApi~deleteApiKeyCallback
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.
75
+ * Create a new API key
76
+ * Creates a new API key for authenticating with the API. New keys start in ACTIVE status and can be used immediately for authentication. The response includes the one-time raw API key value which will not be retrievable later - clients must save this value as it cannot be recovered. Requires CREATE_APIKEY_OWN permission (or CREATE_APIKEY_ANY for admin users). Side effects include generating cryptographically secure key material, recording creation timestamp, and tracking creator ID. Returns INVALID_ARGUMENT if expires_at is set to a time in the past.
77
+ * @param {module:model/CreateApiKeyRequest} createApiKeyRequest API key configuration
78
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateApiKeyResponse}
89
79
  */
80
+ }, {
81
+ key: "createApiKey",
82
+ value: function createApiKey(createApiKeyRequest) {
83
+ return this.createApiKeyWithHttpInfo(createApiKeyRequest).then(function (response_and_data) {
84
+ return response_and_data.data;
85
+ });
86
+ }
90
87
 
91
88
  /**
92
89
  * Delete an API key
93
- * Deletes (revokes) an API key. This operation cannot be undone.
90
+ * Permanently deletes an API key. This operation cannot be undone and immediately invalidates the key for all future authentication attempts. TIP: For reversible deactivation, use PUT /v1/apikeys/{id} with status=INACTIVE instead. Requires DELETE_APIKEY_OWN permission for keys you own (or DELETE_APIKEY_ANY for admin users to delete any user's keys). Side effects include permanently removing the key record from the database and immediate authentication invalidation.
94
91
  * @param {String} id The unique identifier of the API key to delete
95
- * @param {module:api/APIKeysApi~deleteApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
92
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
96
93
  */
97
94
  }, {
98
- key: "deleteApiKey",
99
- value: function deleteApiKey(id, callback) {
95
+ key: "deleteApiKeyWithHttpInfo",
96
+ value: function deleteApiKeyWithHttpInfo(id) {
100
97
  var postBody = null;
101
98
  // verify the required parameter 'id' is set
102
99
  if (id === undefined || id === null) {
@@ -112,26 +109,31 @@ var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
112
109
  var contentTypes = [];
113
110
  var accepts = [];
114
111
  var returnType = null;
115
- return this.apiClient.callApi('/v1/apikeys/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
112
+ return this.apiClient.callApi('/v1/apikeys/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
116
113
  }
117
114
 
118
115
  /**
119
- * Callback function to receive the result of the listApiKeys operation.
120
- * @callback module:api/APIKeysApi~listApiKeysCallback
121
- * @param {String} error Error message, if any.
122
- * @param {module:model/ListApiKeysResponse} data The data returned by the service call.
123
- * @param {String} response The complete HTTP response.
116
+ * Delete an API key
117
+ * Permanently deletes an API key. This operation cannot be undone and immediately invalidates the key for all future authentication attempts. TIP: For reversible deactivation, use PUT /v1/apikeys/{id} with status=INACTIVE instead. Requires DELETE_APIKEY_OWN permission for keys you own (or DELETE_APIKEY_ANY for admin users to delete any user's keys). Side effects include permanently removing the key record from the database and immediate authentication invalidation.
118
+ * @param {String} id The unique identifier of the API key to delete
119
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}
124
120
  */
121
+ }, {
122
+ key: "deleteApiKey",
123
+ value: function deleteApiKey(id) {
124
+ return this.deleteApiKeyWithHttpInfo(id).then(function (response_and_data) {
125
+ return response_and_data.data;
126
+ });
127
+ }
125
128
 
126
129
  /**
127
130
  * List API keys
128
- * Retrieves a list of API keys belonging to the authenticated user. The list includes metadata about each key but not the actual key values.
129
- * @param {module:api/APIKeysApi~listApiKeysCallback} callback The callback function, accepting three arguments: error, data, response
130
- * data is of type: {@link module:model/ListApiKeysResponse}
131
+ * Retrieves a list of API keys belonging to the authenticated user. The list includes metadata about each key but not the actual key values or key hashes for security reasons. Requires LIST_APIKEY_OWN permission (or LIST_APIKEY_ANY for admin users to view keys from any user). This is a read-only operation with no side effects.
132
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListApiKeysResponse} and HTTP response
131
133
  */
132
134
  }, {
133
- key: "listApiKeys",
134
- value: function listApiKeys(callback) {
135
+ key: "listApiKeysWithHttpInfo",
136
+ value: function listApiKeysWithHttpInfo() {
135
137
  var postBody = null;
136
138
  var pathParams = {};
137
139
  var queryParams = {};
@@ -141,28 +143,32 @@ var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
141
143
  var contentTypes = [];
142
144
  var accepts = ['application/json'];
143
145
  var returnType = _ListApiKeysResponse["default"];
144
- return this.apiClient.callApi('/v1/apikeys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
146
+ return this.apiClient.callApi('/v1/apikeys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
145
147
  }
146
148
 
147
149
  /**
148
- * Callback function to receive the result of the updateApiKey operation.
149
- * @callback module:api/APIKeysApi~updateApiKeyCallback
150
- * @param {String} error Error message, if any.
151
- * @param {module:model/ApiKeyResponse} data The data returned by the service call.
152
- * @param {String} response The complete HTTP response.
150
+ * List API keys
151
+ * Retrieves a list of API keys belonging to the authenticated user. The list includes metadata about each key but not the actual key values or key hashes for security reasons. Requires LIST_APIKEY_OWN permission (or LIST_APIKEY_ANY for admin users to view keys from any user). This is a read-only operation with no side effects.
152
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListApiKeysResponse}
153
153
  */
154
+ }, {
155
+ key: "listApiKeys",
156
+ value: function listApiKeys() {
157
+ return this.listApiKeysWithHttpInfo().then(function (response_and_data) {
158
+ return response_and_data.data;
159
+ });
160
+ }
154
161
 
155
162
  /**
156
163
  * Update an API key
157
- * Updates an existing API key with new values for status or labels.
164
+ * Updates an existing API key with new values for status or labels. IMPORTANT: Key ID, user ownership, key material, and audit fields cannot be modified - only status (ACTIVE/INACTIVE) and labels are mutable. Requires UPDATE_APIKEY_OWN permission for keys you own (or UPDATE_APIKEY_ANY for admin users to modify any user's keys). Side effects include updating the updated_at timestamp and recording the updater's user ID. This operation is idempotent - repeated identical requests have no additional effect.
158
165
  * @param {String} id The unique identifier of the API key to update
159
166
  * @param {module:model/UpdateApiKeyRequest} updateApiKeyRequest API key update details
160
- * @param {module:api/APIKeysApi~updateApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
161
- * data is of type: {@link module:model/ApiKeyResponse}
167
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiKeyResponse} and HTTP response
162
168
  */
163
169
  }, {
164
- key: "updateApiKey",
165
- value: function updateApiKey(id, updateApiKeyRequest, callback) {
170
+ key: "updateApiKeyWithHttpInfo",
171
+ value: function updateApiKeyWithHttpInfo(id, updateApiKeyRequest) {
166
172
  var postBody = updateApiKeyRequest;
167
173
  // verify the required parameter 'id' is set
168
174
  if (id === undefined || id === null) {
@@ -182,7 +188,22 @@ var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
182
188
  var contentTypes = ['application/json'];
183
189
  var accepts = ['application/json'];
184
190
  var returnType = _ApiKeyResponse["default"];
185
- return this.apiClient.callApi('/v1/apikeys/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
191
+ return this.apiClient.callApi('/v1/apikeys/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
192
+ }
193
+
194
+ /**
195
+ * Update an API key
196
+ * Updates an existing API key with new values for status or labels. IMPORTANT: Key ID, user ownership, key material, and audit fields cannot be modified - only status (ACTIVE/INACTIVE) and labels are mutable. Requires UPDATE_APIKEY_OWN permission for keys you own (or UPDATE_APIKEY_ANY for admin users to modify any user's keys). Side effects include updating the updated_at timestamp and recording the updater's user ID. This operation is idempotent - repeated identical requests have no additional effect.
197
+ * @param {String} id The unique identifier of the API key to update
198
+ * @param {module:model/UpdateApiKeyRequest} updateApiKeyRequest API key update details
199
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiKeyResponse}
200
+ */
201
+ }, {
202
+ key: "updateApiKey",
203
+ value: function updateApiKey(id, updateApiKeyRequest) {
204
+ return this.updateApiKeyWithHttpInfo(id, updateApiKeyRequest).then(function (response_and_data) {
205
+ return response_and_data.data;
206
+ });
186
207
  }
187
208
  }]);
188
209
  }();