@amgix/amgix-client 1.0.0-beta1

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 (80) hide show
  1. package/LICENSE +202 -0
  2. package/dist/apis/AmgixApi.d.ts +236 -0
  3. package/dist/apis/AmgixApi.d.ts.map +1 -0
  4. package/dist/apis/AmgixApi.js +554 -0
  5. package/dist/apis/index.d.ts +2 -0
  6. package/dist/apis/index.d.ts.map +1 -0
  7. package/dist/apis/index.js +19 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +21 -0
  11. package/dist/models/BulkUploadRequest.d.ts +34 -0
  12. package/dist/models/BulkUploadRequest.d.ts.map +1 -0
  13. package/dist/models/BulkUploadRequest.js +51 -0
  14. package/dist/models/CollectionConfig.d.ts +47 -0
  15. package/dist/models/CollectionConfig.d.ts.map +1 -0
  16. package/dist/models/CollectionConfig.js +56 -0
  17. package/dist/models/CustomDocumentVector.d.ts +55 -0
  18. package/dist/models/CustomDocumentVector.d.ts.map +1 -0
  19. package/dist/models/CustomDocumentVector.js +68 -0
  20. package/dist/models/CustomVector.d.ts +40 -0
  21. package/dist/models/CustomVector.d.ts.map +1 -0
  22. package/dist/models/CustomVector.js +55 -0
  23. package/dist/models/Document.d.ts +80 -0
  24. package/dist/models/Document.d.ts.map +1 -0
  25. package/dist/models/Document.js +69 -0
  26. package/dist/models/DocumentStatus.d.ts +67 -0
  27. package/dist/models/DocumentStatus.d.ts.map +1 -0
  28. package/dist/models/DocumentStatus.js +70 -0
  29. package/dist/models/DocumentStatusResponse.d.ts +34 -0
  30. package/dist/models/DocumentStatusResponse.d.ts.map +1 -0
  31. package/dist/models/DocumentStatusResponse.js +51 -0
  32. package/dist/models/HTTPValidationError.d.ts +34 -0
  33. package/dist/models/HTTPValidationError.d.ts.map +1 -0
  34. package/dist/models/HTTPValidationError.js +49 -0
  35. package/dist/models/MetadataFilter.d.ts +74 -0
  36. package/dist/models/MetadataFilter.d.ts.map +1 -0
  37. package/dist/models/MetadataFilter.js +69 -0
  38. package/dist/models/MetadataIndex.d.ts +50 -0
  39. package/dist/models/MetadataIndex.d.ts.map +1 -0
  40. package/dist/models/MetadataIndex.js +65 -0
  41. package/dist/models/OkResponse.d.ts +33 -0
  42. package/dist/models/OkResponse.d.ts.map +1 -0
  43. package/dist/models/OkResponse.js +50 -0
  44. package/dist/models/QueueInfo.d.ts +52 -0
  45. package/dist/models/QueueInfo.d.ts.map +1 -0
  46. package/dist/models/QueueInfo.js +62 -0
  47. package/dist/models/SearchQuery.d.ts +86 -0
  48. package/dist/models/SearchQuery.d.ts.map +1 -0
  49. package/dist/models/SearchQuery.js +69 -0
  50. package/dist/models/SearchResult.d.ts +87 -0
  51. package/dist/models/SearchResult.d.ts.map +1 -0
  52. package/dist/models/SearchResult.js +74 -0
  53. package/dist/models/ValidationError.d.ts +46 -0
  54. package/dist/models/ValidationError.d.ts.map +1 -0
  55. package/dist/models/ValidationError.js +59 -0
  56. package/dist/models/ValidationErrorLocInner.d.ts +27 -0
  57. package/dist/models/ValidationErrorLocInner.d.ts.map +1 -0
  58. package/dist/models/ValidationErrorLocInner.js +38 -0
  59. package/dist/models/Vector.d.ts +27 -0
  60. package/dist/models/Vector.d.ts.map +1 -0
  61. package/dist/models/Vector.js +38 -0
  62. package/dist/models/VectorConfig.d.ts +154 -0
  63. package/dist/models/VectorConfig.d.ts.map +1 -0
  64. package/dist/models/VectorConfig.js +113 -0
  65. package/dist/models/VectorScore.d.ts +51 -0
  66. package/dist/models/VectorScore.d.ts.map +1 -0
  67. package/dist/models/VectorScore.js +62 -0
  68. package/dist/models/VectorSearchWeight.d.ts +56 -0
  69. package/dist/models/VectorSearchWeight.d.ts.map +1 -0
  70. package/dist/models/VectorSearchWeight.js +67 -0
  71. package/dist/models/VersionResponse.d.ts +33 -0
  72. package/dist/models/VersionResponse.d.ts.map +1 -0
  73. package/dist/models/VersionResponse.js +50 -0
  74. package/dist/models/index.d.ts +22 -0
  75. package/dist/models/index.d.ts.map +1 -0
  76. package/dist/models/index.js +39 -0
  77. package/dist/runtime.d.ts +185 -0
  78. package/dist/runtime.d.ts.map +1 -0
  79. package/dist/runtime.js +338 -0
  80. package/package.json +27 -0
@@ -0,0 +1,554 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Amalgam Index API
6
+ * Amalgam Index (Amgix). The Hybrid Semantic Search Platform, API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0-dev
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.AmgixApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class AmgixApi extends runtime.BaseAPI {
56
+ /**
57
+ * Create a new collection. This endpoint creates a new collection with the specified name and vector configurations. It validates the provided model configurations and ensures all required features are supported by the database. Args: collection_name: The unique name for the new collection (alphanumeric, underscores, hyphens only). config: Configuration details for the collection, including vector types and storage options. Returns: An `OkResponse` object indicating the success of the operation. Raises: HTTPException: - 400 if model validation fails or required features are not supported. - 409 if a collection with the same name already exists. - 500 if the collection creation fails in the database.
58
+ * Create Collection
59
+ */
60
+ async createCollectionRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['collectionName'] == null) {
62
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling createCollection().');
63
+ }
64
+ if (requestParameters['collectionConfig'] == null) {
65
+ throw new runtime.RequiredError('collectionConfig', 'Required parameter "collectionConfig" was null or undefined when calling createCollection().');
66
+ }
67
+ const queryParameters = {};
68
+ const headerParameters = {};
69
+ headerParameters['Content-Type'] = 'application/json';
70
+ let urlPath = `/v1/collections/{collection_name}`;
71
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
72
+ const response = await this.request({
73
+ path: urlPath,
74
+ method: 'POST',
75
+ headers: headerParameters,
76
+ query: queryParameters,
77
+ body: (0, index_1.CollectionConfigToJSON)(requestParameters['collectionConfig']),
78
+ }, initOverrides);
79
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
80
+ }
81
+ /**
82
+ * Create a new collection. This endpoint creates a new collection with the specified name and vector configurations. It validates the provided model configurations and ensures all required features are supported by the database. Args: collection_name: The unique name for the new collection (alphanumeric, underscores, hyphens only). config: Configuration details for the collection, including vector types and storage options. Returns: An `OkResponse` object indicating the success of the operation. Raises: HTTPException: - 400 if model validation fails or required features are not supported. - 409 if a collection with the same name already exists. - 500 if the collection creation fails in the database.
83
+ * Create Collection
84
+ */
85
+ async createCollection(requestParameters, initOverrides) {
86
+ const response = await this.createCollectionRaw(requestParameters, initOverrides);
87
+ return await response.value();
88
+ }
89
+ /**
90
+ * Delete a collection. Deletes a collection and all its associated data. This operation is irreversible. Args: collection_name: The name of the collection to delete. Returns: An `OkResponse` object indicating the success of the operation.
91
+ * Delete Collection
92
+ */
93
+ async deleteCollectionRaw(requestParameters, initOverrides) {
94
+ if (requestParameters['collectionName'] == null) {
95
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling deleteCollection().');
96
+ }
97
+ const queryParameters = {};
98
+ const headerParameters = {};
99
+ let urlPath = `/v1/collections/{collection_name}`;
100
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
101
+ const response = await this.request({
102
+ path: urlPath,
103
+ method: 'DELETE',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ }, initOverrides);
107
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
108
+ }
109
+ /**
110
+ * Delete a collection. Deletes a collection and all its associated data. This operation is irreversible. Args: collection_name: The name of the collection to delete. Returns: An `OkResponse` object indicating the success of the operation.
111
+ * Delete Collection
112
+ */
113
+ async deleteCollection(requestParameters, initOverrides) {
114
+ const response = await this.deleteCollectionRaw(requestParameters, initOverrides);
115
+ return await response.value();
116
+ }
117
+ /**
118
+ * Delete all queue entries for a collection. Removes all documents from the processing queue for a specified collection. This does not affect documents already indexed in the collection. Args: collection_name: The name of the collection for which to delete queue entries. Returns: An `OkResponse` object indicating the success of the operation.
119
+ * Delete Collection Queue
120
+ */
121
+ async deleteCollectionQueueRaw(requestParameters, initOverrides) {
122
+ if (requestParameters['collectionName'] == null) {
123
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling deleteCollectionQueue().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ let urlPath = `/v1/collections/{collection_name}/queue`;
128
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
129
+ const response = await this.request({
130
+ path: urlPath,
131
+ method: 'DELETE',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ }, initOverrides);
135
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
136
+ }
137
+ /**
138
+ * Delete all queue entries for a collection. Removes all documents from the processing queue for a specified collection. This does not affect documents already indexed in the collection. Args: collection_name: The name of the collection for which to delete queue entries. Returns: An `OkResponse` object indicating the success of the operation.
139
+ * Delete Collection Queue
140
+ */
141
+ async deleteCollectionQueue(requestParameters, initOverrides) {
142
+ const response = await this.deleteCollectionQueueRaw(requestParameters, initOverrides);
143
+ return await response.value();
144
+ }
145
+ /**
146
+ * Delete a document. Deletes a specific document by its ID from the specified collection. Args: collection_name: The name of the collection. document_id: The unique identifier of the document to delete. Returns: An `OkResponse` object indicating the success of the operation.
147
+ * Delete Document
148
+ */
149
+ async deleteDocumentRaw(requestParameters, initOverrides) {
150
+ if (requestParameters['collectionName'] == null) {
151
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling deleteDocument().');
152
+ }
153
+ if (requestParameters['documentId'] == null) {
154
+ throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling deleteDocument().');
155
+ }
156
+ const queryParameters = {};
157
+ const headerParameters = {};
158
+ let urlPath = `/v1/collections/{collection_name}/documents/{document_id}`;
159
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
160
+ urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
161
+ const response = await this.request({
162
+ path: urlPath,
163
+ method: 'DELETE',
164
+ headers: headerParameters,
165
+ query: queryParameters,
166
+ }, initOverrides);
167
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
168
+ }
169
+ /**
170
+ * Delete a document. Deletes a specific document by its ID from the specified collection. Args: collection_name: The name of the collection. document_id: The unique identifier of the document to delete. Returns: An `OkResponse` object indicating the success of the operation.
171
+ * Delete Document
172
+ */
173
+ async deleteDocument(requestParameters, initOverrides) {
174
+ const response = await this.deleteDocumentRaw(requestParameters, initOverrides);
175
+ return await response.value();
176
+ }
177
+ /**
178
+ * Empty a collection. Removes all documents and their associated vector data from a specified collection, but keeps the collection\'s configuration. Args: collection_name: The name of the collection to empty. Returns: An `OkResponse` object indicating the success of the operation.
179
+ * Empty Collection
180
+ */
181
+ async emptyCollectionRaw(requestParameters, initOverrides) {
182
+ if (requestParameters['collectionName'] == null) {
183
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling emptyCollection().');
184
+ }
185
+ const queryParameters = {};
186
+ const headerParameters = {};
187
+ let urlPath = `/v1/collections/{collection_name}/empty`;
188
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
189
+ const response = await this.request({
190
+ path: urlPath,
191
+ method: 'POST',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ }, initOverrides);
195
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
196
+ }
197
+ /**
198
+ * Empty a collection. Removes all documents and their associated vector data from a specified collection, but keeps the collection\'s configuration. Args: collection_name: The name of the collection to empty. Returns: An `OkResponse` object indicating the success of the operation.
199
+ * Empty Collection
200
+ */
201
+ async emptyCollection(requestParameters, initOverrides) {
202
+ const response = await this.emptyCollectionRaw(requestParameters, initOverrides);
203
+ return await response.value();
204
+ }
205
+ /**
206
+ * Get collection configuration. Retrieves the configuration details for a specific collection. Args: collection_name: The name of the collection. Returns: The configuration of the specified collection.
207
+ * Get Collection Config
208
+ */
209
+ async getCollectionConfigRaw(requestParameters, initOverrides) {
210
+ if (requestParameters['collectionName'] == null) {
211
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling getCollectionConfig().');
212
+ }
213
+ const queryParameters = {};
214
+ const headerParameters = {};
215
+ let urlPath = `/v1/collections/{collection_name}`;
216
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
217
+ const response = await this.request({
218
+ path: urlPath,
219
+ method: 'GET',
220
+ headers: headerParameters,
221
+ query: queryParameters,
222
+ }, initOverrides);
223
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CollectionConfigFromJSON)(jsonValue));
224
+ }
225
+ /**
226
+ * Get collection configuration. Retrieves the configuration details for a specific collection. Args: collection_name: The name of the collection. Returns: The configuration of the specified collection.
227
+ * Get Collection Config
228
+ */
229
+ async getCollectionConfig(requestParameters, initOverrides) {
230
+ const response = await this.getCollectionConfigRaw(requestParameters, initOverrides);
231
+ return await response.value();
232
+ }
233
+ /**
234
+ * Get queue statistics for a collection. Retrieves counts of documents in different queue states (queued, requeued, failed). Args: collection_name: The name of the collection. Returns: A `QueueInfo` object with counts for each queue state.
235
+ * Get Collection Queue Info
236
+ */
237
+ async getCollectionQueueInfoRaw(requestParameters, initOverrides) {
238
+ if (requestParameters['collectionName'] == null) {
239
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling getCollectionQueueInfo().');
240
+ }
241
+ const queryParameters = {};
242
+ const headerParameters = {};
243
+ let urlPath = `/v1/collections/{collection_name}/queue/info`;
244
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
245
+ const response = await this.request({
246
+ path: urlPath,
247
+ method: 'GET',
248
+ headers: headerParameters,
249
+ query: queryParameters,
250
+ }, initOverrides);
251
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.QueueInfoFromJSON)(jsonValue));
252
+ }
253
+ /**
254
+ * Get queue statistics for a collection. Retrieves counts of documents in different queue states (queued, requeued, failed). Args: collection_name: The name of the collection. Returns: A `QueueInfo` object with counts for each queue state.
255
+ * Get Collection Queue Info
256
+ */
257
+ async getCollectionQueueInfo(requestParameters, initOverrides) {
258
+ const response = await this.getCollectionQueueInfoRaw(requestParameters, initOverrides);
259
+ return await response.value();
260
+ }
261
+ /**
262
+ * Retrieve a single document. Retrieves a specific document by its ID from the specified collection. Args: collection_name: The name of the collection. document_id: The unique identifier of the document to retrieve. Returns: The retrieved `Document` object. Raises: HTTPException: 404 if the document is not found in the collection.
263
+ * Get Document
264
+ */
265
+ async getDocumentRaw(requestParameters, initOverrides) {
266
+ if (requestParameters['collectionName'] == null) {
267
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling getDocument().');
268
+ }
269
+ if (requestParameters['documentId'] == null) {
270
+ throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling getDocument().');
271
+ }
272
+ const queryParameters = {};
273
+ const headerParameters = {};
274
+ let urlPath = `/v1/collections/{collection_name}/documents/{document_id}`;
275
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
276
+ urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
277
+ const response = await this.request({
278
+ path: urlPath,
279
+ method: 'GET',
280
+ headers: headerParameters,
281
+ query: queryParameters,
282
+ }, initOverrides);
283
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentFromJSON)(jsonValue));
284
+ }
285
+ /**
286
+ * Retrieve a single document. Retrieves a specific document by its ID from the specified collection. Args: collection_name: The name of the collection. document_id: The unique identifier of the document to retrieve. Returns: The retrieved `Document` object. Raises: HTTPException: 404 if the document is not found in the collection.
287
+ * Get Document
288
+ */
289
+ async getDocument(requestParameters, initOverrides) {
290
+ const response = await this.getDocumentRaw(requestParameters, initOverrides);
291
+ return await response.value();
292
+ }
293
+ /**
294
+ * Get document processing status. Retrieves the processing status of a document, including its current state in the queue and any associated messages. Args: collection_name: The name of the collection. document_id: The unique identifier of the document. Returns: A `DocumentStatusResponse` object containing the processing status of the document. Raises: HTTPException: 404 if the document is not found in the collection\'s queue.
295
+ * Get Document Status
296
+ */
297
+ async getDocumentStatusRaw(requestParameters, initOverrides) {
298
+ if (requestParameters['collectionName'] == null) {
299
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling getDocumentStatus().');
300
+ }
301
+ if (requestParameters['documentId'] == null) {
302
+ throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling getDocumentStatus().');
303
+ }
304
+ const queryParameters = {};
305
+ const headerParameters = {};
306
+ let urlPath = `/v1/collections/{collection_name}/documents/{document_id}/status`;
307
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
308
+ urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
309
+ const response = await this.request({
310
+ path: urlPath,
311
+ method: 'GET',
312
+ headers: headerParameters,
313
+ query: queryParameters,
314
+ }, initOverrides);
315
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentStatusResponseFromJSON)(jsonValue));
316
+ }
317
+ /**
318
+ * Get document processing status. Retrieves the processing status of a document, including its current state in the queue and any associated messages. Args: collection_name: The name of the collection. document_id: The unique identifier of the document. Returns: A `DocumentStatusResponse` object containing the processing status of the document. Raises: HTTPException: 404 if the document is not found in the collection\'s queue.
319
+ * Get Document Status
320
+ */
321
+ async getDocumentStatus(requestParameters, initOverrides) {
322
+ const response = await this.getDocumentStatusRaw(requestParameters, initOverrides);
323
+ return await response.value();
324
+ }
325
+ /**
326
+ * Check API service responsiveness. This endpoint returns a simple \'ok\' status to indicate that the API service is running and able to respond to requests. Returns: An `OkResponse` object with the \'ok\' field set to True, confirming the service\'s responsiveness.
327
+ * Health
328
+ */
329
+ async healthCheckRaw(initOverrides) {
330
+ const queryParameters = {};
331
+ const headerParameters = {};
332
+ let urlPath = `/v1/health/check`;
333
+ const response = await this.request({
334
+ path: urlPath,
335
+ method: 'GET',
336
+ headers: headerParameters,
337
+ query: queryParameters,
338
+ }, initOverrides);
339
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
340
+ }
341
+ /**
342
+ * Check API service responsiveness. This endpoint returns a simple \'ok\' status to indicate that the API service is running and able to respond to requests. Returns: An `OkResponse` object with the \'ok\' field set to True, confirming the service\'s responsiveness.
343
+ * Health
344
+ */
345
+ async healthCheck(initOverrides) {
346
+ const response = await this.healthCheckRaw(initOverrides);
347
+ return await response.value();
348
+ }
349
+ /**
350
+ * Check if service is ready to handle requests. Verifies connectivity to required dependencies: - Database (Qdrant/PostgreSQL/MariaDB) - RabbitMQ message broker Returns: An `OkResponse` object with ok=True if all dependencies are healthy. Raises: HTTPException: 503 if any dependency is unavailable.
351
+ * Readiness Check
352
+ */
353
+ async healthReadyRaw(initOverrides) {
354
+ const queryParameters = {};
355
+ const headerParameters = {};
356
+ let urlPath = `/v1/health/ready`;
357
+ const response = await this.request({
358
+ path: urlPath,
359
+ method: 'GET',
360
+ headers: headerParameters,
361
+ query: queryParameters,
362
+ }, initOverrides);
363
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
364
+ }
365
+ /**
366
+ * Check if service is ready to handle requests. Verifies connectivity to required dependencies: - Database (Qdrant/PostgreSQL/MariaDB) - RabbitMQ message broker Returns: An `OkResponse` object with ok=True if all dependencies are healthy. Raises: HTTPException: 503 if any dependency is unavailable.
367
+ * Readiness Check
368
+ */
369
+ async healthReady(initOverrides) {
370
+ const response = await this.healthReadyRaw(initOverrides);
371
+ return await response.value();
372
+ }
373
+ /**
374
+ * List all available collections. Retrieves a list of all collections managed by the application. Returns: A list of strings, where each string is the name of an available collection.
375
+ * List Collections
376
+ */
377
+ async listCollectionsRaw(initOverrides) {
378
+ const queryParameters = {};
379
+ const headerParameters = {};
380
+ let urlPath = `/v1/collections`;
381
+ const response = await this.request({
382
+ path: urlPath,
383
+ method: 'GET',
384
+ headers: headerParameters,
385
+ query: queryParameters,
386
+ }, initOverrides);
387
+ return new runtime.JSONApiResponse(response);
388
+ }
389
+ /**
390
+ * List all available collections. Retrieves a list of all collections managed by the application. Returns: A list of strings, where each string is the name of an available collection.
391
+ * List Collections
392
+ */
393
+ async listCollections(initOverrides) {
394
+ const response = await this.listCollectionsRaw(initOverrides);
395
+ return await response.value();
396
+ }
397
+ /**
398
+ * Perform a search query on a collection. Executes a search query against the specified collection. Args: collection_name: The name of the collection to search. query: The `SearchQuery` object containing the search text, filters, and other parameters. Returns: A list of `SearchResult` objects, where each object represents a search result.
399
+ * Search
400
+ */
401
+ async searchRaw(requestParameters, initOverrides) {
402
+ if (requestParameters['collectionName'] == null) {
403
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling search().');
404
+ }
405
+ if (requestParameters['searchQuery'] == null) {
406
+ throw new runtime.RequiredError('searchQuery', 'Required parameter "searchQuery" was null or undefined when calling search().');
407
+ }
408
+ const queryParameters = {};
409
+ const headerParameters = {};
410
+ headerParameters['Content-Type'] = 'application/json';
411
+ let urlPath = `/v1/collections/{collection_name}/search`;
412
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
413
+ const response = await this.request({
414
+ path: urlPath,
415
+ method: 'POST',
416
+ headers: headerParameters,
417
+ query: queryParameters,
418
+ body: (0, index_1.SearchQueryToJSON)(requestParameters['searchQuery']),
419
+ }, initOverrides);
420
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.SearchResultFromJSON));
421
+ }
422
+ /**
423
+ * Perform a search query on a collection. Executes a search query against the specified collection. Args: collection_name: The name of the collection to search. query: The `SearchQuery` object containing the search text, filters, and other parameters. Returns: A list of `SearchResult` objects, where each object represents a search result.
424
+ * Search
425
+ */
426
+ async search(requestParameters, initOverrides) {
427
+ const response = await this.searchRaw(requestParameters, initOverrides);
428
+ return await response.value();
429
+ }
430
+ /**
431
+ * Upsert a single document asynchronously. Adds or updates a single document in the specified collection by placing it into a processing queue. The document will be vectorized and indexed asynchronously. Args: collection_name: The name of the collection to upsert the document into. document: The document object to be upserted. Returns: An `OkResponse` object indicating that the document has been accepted for processing. Raises: HTTPException: 500 if publishing the event to the internal queue fails.
432
+ * Upsert Document
433
+ */
434
+ async upsertDocumentRaw(requestParameters, initOverrides) {
435
+ if (requestParameters['collectionName'] == null) {
436
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling upsertDocument().');
437
+ }
438
+ if (requestParameters['document'] == null) {
439
+ throw new runtime.RequiredError('document', 'Required parameter "document" was null or undefined when calling upsertDocument().');
440
+ }
441
+ const queryParameters = {};
442
+ const headerParameters = {};
443
+ headerParameters['Content-Type'] = 'application/json';
444
+ let urlPath = `/v1/collections/{collection_name}/documents`;
445
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
446
+ const response = await this.request({
447
+ path: urlPath,
448
+ method: 'POST',
449
+ headers: headerParameters,
450
+ query: queryParameters,
451
+ body: (0, index_1.DocumentToJSON)(requestParameters['document']),
452
+ }, initOverrides);
453
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
454
+ }
455
+ /**
456
+ * Upsert a single document asynchronously. Adds or updates a single document in the specified collection by placing it into a processing queue. The document will be vectorized and indexed asynchronously. Args: collection_name: The name of the collection to upsert the document into. document: The document object to be upserted. Returns: An `OkResponse` object indicating that the document has been accepted for processing. Raises: HTTPException: 500 if publishing the event to the internal queue fails.
457
+ * Upsert Document
458
+ */
459
+ async upsertDocument(requestParameters, initOverrides) {
460
+ const response = await this.upsertDocumentRaw(requestParameters, initOverrides);
461
+ return await response.value();
462
+ }
463
+ /**
464
+ * Upsert a single document synchronously. Adds or updates a single document in the specified collection and waits for the operation to complete, including vectorization and indexing. Args: collection_name: The name of the collection to upsert the document into. document: The document object to be upserted. Returns: An `OkResponse` object indicating the success of the operation. Raises: HTTPException: - 409 if a document with the same ID and newer timestamp already exists (conflict). - 500 for other internal server errors during processing.
465
+ * Upsert Document Sync
466
+ */
467
+ async upsertDocumentSyncRaw(requestParameters, initOverrides) {
468
+ if (requestParameters['collectionName'] == null) {
469
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling upsertDocumentSync().');
470
+ }
471
+ if (requestParameters['document'] == null) {
472
+ throw new runtime.RequiredError('document', 'Required parameter "document" was null or undefined when calling upsertDocumentSync().');
473
+ }
474
+ const queryParameters = {};
475
+ const headerParameters = {};
476
+ headerParameters['Content-Type'] = 'application/json';
477
+ let urlPath = `/v1/collections/{collection_name}/documents/sync`;
478
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
479
+ const response = await this.request({
480
+ path: urlPath,
481
+ method: 'POST',
482
+ headers: headerParameters,
483
+ query: queryParameters,
484
+ body: (0, index_1.DocumentToJSON)(requestParameters['document']),
485
+ }, initOverrides);
486
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
487
+ }
488
+ /**
489
+ * Upsert a single document synchronously. Adds or updates a single document in the specified collection and waits for the operation to complete, including vectorization and indexing. Args: collection_name: The name of the collection to upsert the document into. document: The document object to be upserted. Returns: An `OkResponse` object indicating the success of the operation. Raises: HTTPException: - 409 if a document with the same ID and newer timestamp already exists (conflict). - 500 for other internal server errors during processing.
490
+ * Upsert Document Sync
491
+ */
492
+ async upsertDocumentSync(requestParameters, initOverrides) {
493
+ const response = await this.upsertDocumentSyncRaw(requestParameters, initOverrides);
494
+ return await response.value();
495
+ }
496
+ /**
497
+ * Upsert multiple documents in bulk asynchronously. Adds or updates multiple documents in the specified collection by placing them into a processing queue. Documents will be vectorized and indexed asynchronously. This method is optimized for bulk operations. Args: collection_name: The name of the collection to upsert the documents into. request: A `BulkUploadRequest` object containing a list of `Document` objects to be upserted. Returns: An `OkResponse` object indicating that the documents have been accepted for processing. Raises: HTTPException: 500 if publishing events to the internal queue fails for any document.
498
+ * Upsert Documents Bulk
499
+ */
500
+ async upsertDocumentsBulkRaw(requestParameters, initOverrides) {
501
+ if (requestParameters['collectionName'] == null) {
502
+ throw new runtime.RequiredError('collectionName', 'Required parameter "collectionName" was null or undefined when calling upsertDocumentsBulk().');
503
+ }
504
+ if (requestParameters['bulkUploadRequest'] == null) {
505
+ throw new runtime.RequiredError('bulkUploadRequest', 'Required parameter "bulkUploadRequest" was null or undefined when calling upsertDocumentsBulk().');
506
+ }
507
+ const queryParameters = {};
508
+ const headerParameters = {};
509
+ headerParameters['Content-Type'] = 'application/json';
510
+ let urlPath = `/v1/collections/{collection_name}/documents/bulk`;
511
+ urlPath = urlPath.replace(`{${"collection_name"}}`, encodeURIComponent(String(requestParameters['collectionName'])));
512
+ const response = await this.request({
513
+ path: urlPath,
514
+ method: 'POST',
515
+ headers: headerParameters,
516
+ query: queryParameters,
517
+ body: (0, index_1.BulkUploadRequestToJSON)(requestParameters['bulkUploadRequest']),
518
+ }, initOverrides);
519
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OkResponseFromJSON)(jsonValue));
520
+ }
521
+ /**
522
+ * Upsert multiple documents in bulk asynchronously. Adds or updates multiple documents in the specified collection by placing them into a processing queue. Documents will be vectorized and indexed asynchronously. This method is optimized for bulk operations. Args: collection_name: The name of the collection to upsert the documents into. request: A `BulkUploadRequest` object containing a list of `Document` objects to be upserted. Returns: An `OkResponse` object indicating that the documents have been accepted for processing. Raises: HTTPException: 500 if publishing events to the internal queue fails for any document.
523
+ * Upsert Documents Bulk
524
+ */
525
+ async upsertDocumentsBulk(requestParameters, initOverrides) {
526
+ const response = await this.upsertDocumentsBulkRaw(requestParameters, initOverrides);
527
+ return await response.value();
528
+ }
529
+ /**
530
+ * Return the system version. Returns: A `VersionResponse` object with the system version.
531
+ * Version
532
+ */
533
+ async versionRaw(initOverrides) {
534
+ const queryParameters = {};
535
+ const headerParameters = {};
536
+ let urlPath = `/v1/version`;
537
+ const response = await this.request({
538
+ path: urlPath,
539
+ method: 'GET',
540
+ headers: headerParameters,
541
+ query: queryParameters,
542
+ }, initOverrides);
543
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VersionResponseFromJSON)(jsonValue));
544
+ }
545
+ /**
546
+ * Return the system version. Returns: A `VersionResponse` object with the system version.
547
+ * Version
548
+ */
549
+ async version(initOverrides) {
550
+ const response = await this.versionRaw(initOverrides);
551
+ return await response.value();
552
+ }
553
+ }
554
+ exports.AmgixApi = AmgixApi;
@@ -0,0 +1,2 @@
1
+ export * from './AmgixApi';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../apis/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./AmgixApi"), exports);
@@ -0,0 +1,4 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Amalgam Index API
3
+ * Amalgam Index (Amgix). The Hybrid Semantic Search Platform, API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0-dev
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Document } from './Document';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface BulkUploadRequest
17
+ */
18
+ export interface BulkUploadRequest {
19
+ /**
20
+ *
21
+ * @type {Array<Document>}
22
+ * @memberof BulkUploadRequest
23
+ */
24
+ documents: Array<Document>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the BulkUploadRequest interface.
28
+ */
29
+ export declare function instanceOfBulkUploadRequest(value: object): value is BulkUploadRequest;
30
+ export declare function BulkUploadRequestFromJSON(json: any): BulkUploadRequest;
31
+ export declare function BulkUploadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkUploadRequest;
32
+ export declare function BulkUploadRequestToJSON(json: any): BulkUploadRequest;
33
+ export declare function BulkUploadRequestToJSONTyped(value?: BulkUploadRequest | null, ignoreDiscriminator?: boolean): any;
34
+ //# sourceMappingURL=BulkUploadRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BulkUploadRequest.d.ts","sourceRoot":"","sources":["../../models/BulkUploadRequest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQ3C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;OAIG;IACH,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,iBAAiB,CAGrF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEtE;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,OAAO,GAAG,iBAAiB,CAQzG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,GAAG,GAAG,iBAAiB,CAEpE;AAED,wBAAgB,4BAA4B,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,EAAE,mBAAmB,GAAE,OAAe,GAAG,GAAG,CASxH"}