@gomomento/sdk-core 1.79.0 → 1.81.0

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 (59) hide show
  1. package/dist/src/auth/credential-provider.d.ts +0 -6
  2. package/dist/src/auth/credential-provider.js +2 -10
  3. package/dist/src/clients/ICacheClient.d.ts +2 -1
  4. package/dist/src/clients/ICacheClient.js +1 -1
  5. package/dist/src/index.d.ts +0 -8
  6. package/dist/src/index.js +4 -18
  7. package/dist/src/internal/clients/cache/AbstractCacheClient.d.ts +9 -4
  8. package/dist/src/internal/clients/cache/AbstractCacheClient.js +11 -6
  9. package/dist/src/internal/clients/cache/IDataClient.d.ts +3 -3
  10. package/dist/src/internal/clients/cache/IDataClient.js +1 -1
  11. package/dist/src/internal/clients/index.d.ts +0 -1
  12. package/dist/src/internal/clients/index.js +1 -2
  13. package/dist/src/internal/utils/auth.d.ts +0 -2
  14. package/dist/src/internal/utils/auth.js +1 -3
  15. package/dist/src/internal/utils/validators.d.ts +1 -1
  16. package/dist/src/internal/utils/validators.js +4 -4
  17. package/dist/src/messages/responses/cache-batch-get.d.ts +5 -0
  18. package/dist/src/messages/responses/cache-batch-get.js +13 -1
  19. package/dist/src/utils/cache-call-options.d.ts +3 -1
  20. package/dist/src/utils/cache-call-options.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/src/clients/IVectorIndexClient.d.ts +0 -47
  23. package/dist/src/clients/IVectorIndexClient.js +0 -12
  24. package/dist/src/internal/clients/vector/AbstractVectorIndexClient.d.ts +0 -142
  25. package/dist/src/internal/clients/vector/AbstractVectorIndexClient.js +0 -163
  26. package/dist/src/internal/clients/vector/IVectorIndexControlClient.d.ts +0 -26
  27. package/dist/src/internal/clients/vector/IVectorIndexControlClient.js +0 -25
  28. package/dist/src/internal/clients/vector/IVectorIndexDataClient.d.ts +0 -13
  29. package/dist/src/internal/clients/vector/IVectorIndexDataClient.js +0 -3
  30. package/dist/src/internal/clients/vector/index.d.ts +0 -3
  31. package/dist/src/internal/clients/vector/index.js +0 -20
  32. package/dist/src/messages/responses/vector/create-vector-index.d.ts +0 -67
  33. package/dist/src/messages/responses/vector/create-vector-index.js +0 -61
  34. package/dist/src/messages/responses/vector/delete-vector-index.d.ts +0 -61
  35. package/dist/src/messages/responses/vector/delete-vector-index.js +0 -54
  36. package/dist/src/messages/responses/vector/index.d.ts +0 -10
  37. package/dist/src/messages/responses/vector/index.js +0 -14
  38. package/dist/src/messages/responses/vector/list-vector-indexes.d.ts +0 -71
  39. package/dist/src/messages/responses/vector/list-vector-indexes.js +0 -75
  40. package/dist/src/messages/responses/vector/vector-count-items.d.ts +0 -70
  41. package/dist/src/messages/responses/vector/vector-count-items.js +0 -72
  42. package/dist/src/messages/responses/vector/vector-delete-item-batch.d.ts +0 -62
  43. package/dist/src/messages/responses/vector/vector-delete-item-batch.js +0 -55
  44. package/dist/src/messages/responses/vector/vector-get-item-batch.d.ts +0 -73
  45. package/dist/src/messages/responses/vector/vector-get-item-batch.js +0 -74
  46. package/dist/src/messages/responses/vector/vector-get-item-metadata-batch.d.ts +0 -73
  47. package/dist/src/messages/responses/vector/vector-get-item-metadata-batch.js +0 -74
  48. package/dist/src/messages/responses/vector/vector-search-and-fetch-vectors.d.ts +0 -69
  49. package/dist/src/messages/responses/vector/vector-search-and-fetch-vectors.js +0 -67
  50. package/dist/src/messages/responses/vector/vector-search.d.ts +0 -70
  51. package/dist/src/messages/responses/vector/vector-search.js +0 -67
  52. package/dist/src/messages/responses/vector/vector-upsert-item-batch.d.ts +0 -61
  53. package/dist/src/messages/responses/vector/vector-upsert-item-batch.js +0 -54
  54. package/dist/src/messages/vector-index-filters.d.ts +0 -279
  55. package/dist/src/messages/vector-index-filters.js +0 -325
  56. package/dist/src/messages/vector-index-info.d.ts +0 -15
  57. package/dist/src/messages/vector-index-info.js +0 -38
  58. package/dist/src/messages/vector-index.d.ts +0 -42
  59. package/dist/src/messages/vector-index.js +0 -3
@@ -1,142 +0,0 @@
1
- import { CreateVectorIndex, DeleteVectorIndex, ListVectorIndexes, VectorCountItems, VectorDeleteItemBatch, VectorFilterExpression, VectorGetItemBatch, VectorGetItemMetadataBatch, VectorSearch, VectorSearchAndFetchVectors, VectorUpsertItemBatch } from '../../..';
2
- import { IVectorIndexClient, SearchOptions } from '../../../clients/IVectorIndexClient';
3
- import { IVectorIndexControlClient, VectorSimilarityMetric } from './IVectorIndexControlClient';
4
- import { VectorIndexItem } from '../../../messages/vector-index';
5
- import { IVectorIndexDataClient } from './IVectorIndexDataClient';
6
- export declare abstract class AbstractVectorIndexClient implements IVectorIndexClient, IVectorIndexDataClient {
7
- protected readonly controlClient: IVectorIndexControlClient;
8
- protected readonly dataClient: IVectorIndexDataClient;
9
- protected constructor(controlClient: IVectorIndexControlClient, dataClient: IVectorIndexDataClient);
10
- /**
11
- * Creates a vector index if it does not exist.
12
- *
13
- * Remark on the choice of similarity metric:
14
- * - Cosine similarity is appropriate for most embedding models as they tend to be optimized
15
- * for this metric.
16
- * - If the vectors are unit normalized, cosine similarity is equivalent to inner product.
17
- * If your vectors are already unit normalized, you can use inner product to improve
18
- * performance.
19
- * - Euclidean similarity, the sum of squared differences, is appropriate for datasets where
20
- * this metric is meaningful. For example, if the vectors represent images, and the
21
- * embedding model is trained to optimize the euclidean distance between images, then
22
- * euclidean similarity is appropriate.
23
- *
24
- * @param {string} indexName - The vector index to be created.
25
- * @param {number} numDimensions - Number of dimensions per vector.
26
- * @param {VectorSimilarityMetric} similarityMetric - The metric used to
27
- * quantify the distance between vectors. Can be cosine similarity,
28
- * inner product, or euclidean similarity. Defaults to cosine similarity.
29
- * @returns {Promise<CreateVectorIndex.Response>} -
30
- * {@link CreateVectorIndex.Success} on success.
31
- * {@link CreateVectorIndex.AlreadyExists} if the cache already exists.
32
- * {@link CreateVectorIndex.Error} on failure.
33
- */
34
- createIndex(indexName: string, numDimensions: number, similarityMetric?: VectorSimilarityMetric): Promise<CreateVectorIndex.Response>;
35
- /**
36
- * Lists all vector indexes.
37
- *
38
- * @returns {Promise<ListVectorIndexes.Response>} -
39
- * {@link ListVectorIndexes.Success} containing the list on success.
40
- * {@link ListVectorIndexes.Error} on error.
41
- */
42
- listIndexes(): Promise<ListVectorIndexes.Response>;
43
- /**
44
- * Deletes a vector index and all the items stored in it.
45
- *
46
- * @param {string} indexName - The name of the vector index to delete.
47
- * @returns {Promise<DeleteVectorIndex.Response>} -
48
- * {@link DeleteVectorIndex.Success} on success.
49
- * {@link DeleteVectorIndex.Error} on error.
50
- */
51
- deleteIndex(indexName: string): Promise<DeleteVectorIndex.Response>;
52
- /**
53
- * Counts the number of items in a vector index.
54
- *
55
- * Note that if the index does not exist, an error with
56
- * {@link MomentoErrorCode} `NOT_FOUND` error will be returned.
57
- *
58
- * @param indexName - Name of the index to count the items in.
59
- * @returns {Promise<VectorCountItems.Response>} -
60
- * {@link VectorCountItems.Success} on success.
61
- * {@link VectorCountItems.Error} on error.
62
- */
63
- countItems(indexName: string): Promise<VectorCountItems.Response>;
64
- /**
65
- * Upserts a batch of items into a vector index.
66
- *
67
- * If an item with the same ID already exists in the index, it will be replaced.
68
- * Otherwise, it will be added to the index.
69
- *
70
- * @param {string} indexName - Name of the index to upsert the items into.
71
- * @param {Array<VectorIndexItem>} items - The items to be upserted into the index.
72
- * @returns {Promise<VectorUpsertItemBatch.Response>} -
73
- * {@link VectorUpsertItemBatch.Success} on success.
74
- * {@link VectorUpsertItemBatch.Error} on error.
75
- */
76
- upsertItemBatch(indexName: string, items: Array<VectorIndexItem>): Promise<VectorUpsertItemBatch.Response>;
77
- /**
78
- * Searches for the most similar vectors to the query vector in the index.
79
- *
80
- * Ranks the vectors according to the similarity metric specified when the
81
- * index was created.
82
- *
83
- * @param {string} indexName - Name of the index to search in.
84
- * @param {Array<number>} queryVector - The vector to search for.
85
- * @param {SearchOptions} options - Optional search arguments, including
86
- * the number of results to return, metadata fields to return, and a score
87
- * threshold to filter results by.
88
- * @returns {Promise<VectorSearch.Response>} -
89
- * {@link VectorSearch.Success} on success.
90
- * {@link VectorSearch.Error} on error.
91
- */
92
- search(indexName: string, queryVector: Array<number>, options?: SearchOptions): Promise<VectorSearch.Response>;
93
- /**
94
- * Searches for the most similar vectors to the query vector in the index.
95
- *
96
- * Ranks the vectors according to the similarity metric specified when the
97
- * index was created.
98
- * Also returns the vectors associated with each result.
99
- *
100
- * @param indexName - Name of the index to search in.
101
- * @param queryVector - The vector to search for.
102
- * @param options - Optional search arguments, including
103
- * the number of results to return, metadata fields to return, and a score
104
- * threshold to filter results by.
105
- * @returns {Promise<VectorSearchAndFetchVectors.Response>} -
106
- * {@link VectorSearchAndFetchVectors.Success} on success.
107
- * {@link VectorSearchAndFetchVectors.Error} on error.
108
- */
109
- searchAndFetchVectors(indexName: string, queryVector: number[], options?: SearchOptions | undefined): Promise<VectorSearchAndFetchVectors.Response>;
110
- /**
111
- * Deletes a batch of items from a vector index.
112
- * Deletes any and all items with the given IDs from the index.
113
- *
114
- * @param {string} indexName - Name of the index to delete the items from.
115
- * @param {VectorFilterExpression | Array<string>} filter - A filter expression to match the items to be deleted
116
- * or an array of item IDs to be deleted.
117
- * @returns {Promise<VectorDeleteItemBatch.Response>}
118
- * {@link VectorDeleteItemBatch.Success} on success.
119
- * {@link VectorDeleteItemBatch.Error} on error.
120
- */
121
- deleteItemBatch(indexName: string, filter: VectorFilterExpression | Array<string>): Promise<VectorDeleteItemBatch.Response>;
122
- /**
123
- * Gets a batch of items from a vector index by ID.
124
- *
125
- * @param indexName - Name of the index to get the items from.
126
- * @param filter - The IDs of the items to be retrieved from the index.
127
- * @returns {Promise<VectorGetItemBatch.Response>}
128
- * {@link VectorGetItemBatch.Success} on success, with the found items.
129
- * {@link VectorGetItemBatch.Error} on error.
130
- */
131
- getItemBatch(indexName: string, filter: string[]): Promise<VectorGetItemBatch.Response>;
132
- /**
133
- * Gets metadata for a batch of items from a vector index by ID.
134
- *
135
- * @param indexName - Name of the index to get the items from.
136
- * @param filter - The IDs of the items to be retrieved from the index.
137
- * @returns {Promise<VectorGetItemMetadataBatch.Response>}
138
- * {@link VectorGetItemMetadataBatch.Success} on success, with the found item metadata.
139
- * {@link VectorGetItemMetadataBatch.Error} on error.
140
- */
141
- getItemMetadataBatch(indexName: string, filter: string[]): Promise<VectorGetItemMetadataBatch.Response>;
142
- }
@@ -1,163 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AbstractVectorIndexClient = void 0;
4
- class AbstractVectorIndexClient {
5
- constructor(controlClient, dataClient) {
6
- this.controlClient = controlClient;
7
- this.dataClient = dataClient;
8
- }
9
- /**
10
- * Creates a vector index if it does not exist.
11
- *
12
- * Remark on the choice of similarity metric:
13
- * - Cosine similarity is appropriate for most embedding models as they tend to be optimized
14
- * for this metric.
15
- * - If the vectors are unit normalized, cosine similarity is equivalent to inner product.
16
- * If your vectors are already unit normalized, you can use inner product to improve
17
- * performance.
18
- * - Euclidean similarity, the sum of squared differences, is appropriate for datasets where
19
- * this metric is meaningful. For example, if the vectors represent images, and the
20
- * embedding model is trained to optimize the euclidean distance between images, then
21
- * euclidean similarity is appropriate.
22
- *
23
- * @param {string} indexName - The vector index to be created.
24
- * @param {number} numDimensions - Number of dimensions per vector.
25
- * @param {VectorSimilarityMetric} similarityMetric - The metric used to
26
- * quantify the distance between vectors. Can be cosine similarity,
27
- * inner product, or euclidean similarity. Defaults to cosine similarity.
28
- * @returns {Promise<CreateVectorIndex.Response>} -
29
- * {@link CreateVectorIndex.Success} on success.
30
- * {@link CreateVectorIndex.AlreadyExists} if the cache already exists.
31
- * {@link CreateVectorIndex.Error} on failure.
32
- */
33
- async createIndex(indexName, numDimensions, similarityMetric) {
34
- return await this.controlClient.createIndex(indexName, numDimensions, similarityMetric);
35
- }
36
- /**
37
- * Lists all vector indexes.
38
- *
39
- * @returns {Promise<ListVectorIndexes.Response>} -
40
- * {@link ListVectorIndexes.Success} containing the list on success.
41
- * {@link ListVectorIndexes.Error} on error.
42
- */
43
- async listIndexes() {
44
- return await this.controlClient.listIndexes();
45
- }
46
- /**
47
- * Deletes a vector index and all the items stored in it.
48
- *
49
- * @param {string} indexName - The name of the vector index to delete.
50
- * @returns {Promise<DeleteVectorIndex.Response>} -
51
- * {@link DeleteVectorIndex.Success} on success.
52
- * {@link DeleteVectorIndex.Error} on error.
53
- */
54
- async deleteIndex(indexName) {
55
- return await this.controlClient.deleteIndex(indexName);
56
- }
57
- /**
58
- * Counts the number of items in a vector index.
59
- *
60
- * Note that if the index does not exist, an error with
61
- * {@link MomentoErrorCode} `NOT_FOUND` error will be returned.
62
- *
63
- * @param indexName - Name of the index to count the items in.
64
- * @returns {Promise<VectorCountItems.Response>} -
65
- * {@link VectorCountItems.Success} on success.
66
- * {@link VectorCountItems.Error} on error.
67
- */
68
- async countItems(indexName) {
69
- return await this.dataClient.countItems(indexName);
70
- }
71
- /**
72
- * Upserts a batch of items into a vector index.
73
- *
74
- * If an item with the same ID already exists in the index, it will be replaced.
75
- * Otherwise, it will be added to the index.
76
- *
77
- * @param {string} indexName - Name of the index to upsert the items into.
78
- * @param {Array<VectorIndexItem>} items - The items to be upserted into the index.
79
- * @returns {Promise<VectorUpsertItemBatch.Response>} -
80
- * {@link VectorUpsertItemBatch.Success} on success.
81
- * {@link VectorUpsertItemBatch.Error} on error.
82
- */
83
- async upsertItemBatch(indexName, items) {
84
- return await this.dataClient.upsertItemBatch(indexName, items);
85
- }
86
- /**
87
- * Searches for the most similar vectors to the query vector in the index.
88
- *
89
- * Ranks the vectors according to the similarity metric specified when the
90
- * index was created.
91
- *
92
- * @param {string} indexName - Name of the index to search in.
93
- * @param {Array<number>} queryVector - The vector to search for.
94
- * @param {SearchOptions} options - Optional search arguments, including
95
- * the number of results to return, metadata fields to return, and a score
96
- * threshold to filter results by.
97
- * @returns {Promise<VectorSearch.Response>} -
98
- * {@link VectorSearch.Success} on success.
99
- * {@link VectorSearch.Error} on error.
100
- */
101
- async search(indexName, queryVector, options) {
102
- return await this.dataClient.search(indexName, queryVector, options);
103
- }
104
- /**
105
- * Searches for the most similar vectors to the query vector in the index.
106
- *
107
- * Ranks the vectors according to the similarity metric specified when the
108
- * index was created.
109
- * Also returns the vectors associated with each result.
110
- *
111
- * @param indexName - Name of the index to search in.
112
- * @param queryVector - The vector to search for.
113
- * @param options - Optional search arguments, including
114
- * the number of results to return, metadata fields to return, and a score
115
- * threshold to filter results by.
116
- * @returns {Promise<VectorSearchAndFetchVectors.Response>} -
117
- * {@link VectorSearchAndFetchVectors.Success} on success.
118
- * {@link VectorSearchAndFetchVectors.Error} on error.
119
- */
120
- async searchAndFetchVectors(indexName, queryVector, options) {
121
- return await this.dataClient.searchAndFetchVectors(indexName, queryVector, options);
122
- }
123
- /**
124
- * Deletes a batch of items from a vector index.
125
- * Deletes any and all items with the given IDs from the index.
126
- *
127
- * @param {string} indexName - Name of the index to delete the items from.
128
- * @param {VectorFilterExpression | Array<string>} filter - A filter expression to match the items to be deleted
129
- * or an array of item IDs to be deleted.
130
- * @returns {Promise<VectorDeleteItemBatch.Response>}
131
- * {@link VectorDeleteItemBatch.Success} on success.
132
- * {@link VectorDeleteItemBatch.Error} on error.
133
- */
134
- async deleteItemBatch(indexName, filter) {
135
- return await this.dataClient.deleteItemBatch(indexName, filter);
136
- }
137
- /**
138
- * Gets a batch of items from a vector index by ID.
139
- *
140
- * @param indexName - Name of the index to get the items from.
141
- * @param filter - The IDs of the items to be retrieved from the index.
142
- * @returns {Promise<VectorGetItemBatch.Response>}
143
- * {@link VectorGetItemBatch.Success} on success, with the found items.
144
- * {@link VectorGetItemBatch.Error} on error.
145
- */
146
- async getItemBatch(indexName, filter) {
147
- return await this.dataClient.getItemBatch(indexName, filter);
148
- }
149
- /**
150
- * Gets metadata for a batch of items from a vector index by ID.
151
- *
152
- * @param indexName - Name of the index to get the items from.
153
- * @param filter - The IDs of the items to be retrieved from the index.
154
- * @returns {Promise<VectorGetItemMetadataBatch.Response>}
155
- * {@link VectorGetItemMetadataBatch.Success} on success, with the found item metadata.
156
- * {@link VectorGetItemMetadataBatch.Error} on error.
157
- */
158
- async getItemMetadataBatch(indexName, filter) {
159
- return await this.dataClient.getItemMetadataBatch(indexName, filter);
160
- }
161
- }
162
- exports.AbstractVectorIndexClient = AbstractVectorIndexClient;
163
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWJzdHJhY3RWZWN0b3JJbmRleENsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcm5hbC9jbGllbnRzL3ZlY3Rvci9BYnN0cmFjdFZlY3RvckluZGV4Q2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQXdCQSxNQUFzQix5QkFBeUI7SUFNN0MsWUFDRSxhQUF3QyxFQUN4QyxVQUFrQztRQUVsQyxJQUFJLENBQUMsYUFBYSxHQUFHLGFBQWEsQ0FBQztRQUNuQyxJQUFJLENBQUMsVUFBVSxHQUFHLFVBQVUsQ0FBQztJQUMvQixDQUFDO0lBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O09BdUJHO0lBQ0ksS0FBSyxDQUFDLFdBQVcsQ0FDdEIsU0FBaUIsRUFDakIsYUFBcUIsRUFDckIsZ0JBQXlDO1FBRXpDLE9BQU8sTUFBTSxJQUFJLENBQUMsYUFBYSxDQUFDLFdBQVcsQ0FDekMsU0FBUyxFQUNULGFBQWEsRUFDYixnQkFBZ0IsQ0FDakIsQ0FBQztJQUNKLENBQUM7SUFFRDs7Ozs7O09BTUc7SUFDSSxLQUFLLENBQUMsV0FBVztRQUN0QixPQUFPLE1BQU0sSUFBSSxDQUFDLGFBQWEsQ0FBQyxXQUFXLEVBQUUsQ0FBQztJQUNoRCxDQUFDO0lBRUQ7Ozs7Ozs7T0FPRztJQUNJLEtBQUssQ0FBQyxXQUFXLENBQ3RCLFNBQWlCO1FBRWpCLE9BQU8sTUF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2V0SXRlbU1ldGFkYXRhQmF0Y2guUmVzcG9uc2U+fVxuICAgKiB7QGxpbmsgVmVjdG9yR2V0SXRlbU1ldGFkYXRhQmF0Y2guU3VjY2Vzc30gb24gc3VjY2Vzcywgd2l0aCB0aGUgZm91bmQgaXRlbSBtZXRhZGF0YS5cbiAgICoge0BsaW5rIFZlY3RvckdldEl0ZW1NZXRhZGF0YUJhdGNoLkVycm9yfSBvbiBlcnJvci5cbiAgICovXG4gIHB1YmxpYyBhc3luYyBnZXRJdGVtTWV0YWRhdGFCYXRjaChcbiAgICBpbmRleE5hbWU6IHN0cmluZyxcbiAgICBmaWx0ZXI6IHN0cmluZ1tdXG4gICk6IFByb21pc2U8VmVjdG9yR2V0SXRlbU1ldGFkYXRhQmF0Y2guUmVzcG9uc2U+IHtcbiAgICByZXR1cm4gYXdhaXQgdGhpcy5kYXRhQ2xpZW50LmdldEl0ZW1NZXRhZGF0YUJhdGNoKGluZGV4TmFtZSwgZmlsdGVyKTtcbiAgfVxufVxuIl19
@@ -1,26 +0,0 @@
1
- import { CreateVectorIndex, DeleteVectorIndex, ListVectorIndexes } from '../../../messages/responses/vector';
2
- /**
3
- * The similarity metric to use when comparing vectors in the index.
4
- */
5
- export declare enum VectorSimilarityMetric {
6
- /**
7
- * The cosine similarity between two vectors, ie the cosine of the angle between them.
8
- * Bigger is better. Ranges from -1 to 1.
9
- */
10
- COSINE_SIMILARITY = "COSINE_SIMILARITY",
11
- /**
12
- * The inner product between two vectors, ie the sum of the element-wise products.
13
- * Bigger is better. Ranges from 0 to infinity.
14
- */
15
- INNER_PRODUCT = "INNER_PRODUCT",
16
- /**
17
- * The Euclidean distance squared between two vectors, ie the sum of squared differences between each element.
18
- * Smaller is better. Ranges from 0 to infinity.
19
- */
20
- EUCLIDEAN_SIMILARITY = "EUCLIDEAN_SIMILARITY"
21
- }
22
- export interface IVectorIndexControlClient {
23
- createIndex(indexName: string, numDimensions: number, similarityMetric?: VectorSimilarityMetric): Promise<CreateVectorIndex.Response>;
24
- listIndexes(): Promise<ListVectorIndexes.Response>;
25
- deleteIndex(indexName: string): Promise<DeleteVectorIndex.Response>;
26
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VectorSimilarityMetric = void 0;
4
- /**
5
- * The similarity metric to use when comparing vectors in the index.
6
- */
7
- var VectorSimilarityMetric;
8
- (function (VectorSimilarityMetric) {
9
- /**
10
- * The cosine similarity between two vectors, ie the cosine of the angle between them.
11
- * Bigger is better. Ranges from -1 to 1.
12
- */
13
- VectorSimilarityMetric["COSINE_SIMILARITY"] = "COSINE_SIMILARITY";
14
- /**
15
- * The inner product between two vectors, ie the sum of the element-wise products.
16
- * Bigger is better. Ranges from 0 to infinity.
17
- */
18
- VectorSimilarityMetric["INNER_PRODUCT"] = "INNER_PRODUCT";
19
- /**
20
- * The Euclidean distance squared between two vectors, ie the sum of squared differences between each element.
21
- * Smaller is better. Ranges from 0 to infinity.
22
- */
23
- VectorSimilarityMetric["EUCLIDEAN_SIMILARITY"] = "EUCLIDEAN_SIMILARITY";
24
- })(VectorSimilarityMetric = exports.VectorSimilarityMetric || (exports.VectorSimilarityMetric = {}));
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSVZlY3RvckluZGV4Q29udHJvbENsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcm5hbC9jbGllbnRzL3ZlY3Rvci9JVmVjdG9ySW5kZXhDb250cm9sQ2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BOztHQUVHO0FBQ0gsSUFBWSxzQkFrQlg7QUFsQkQsV0FBWSxzQkFBc0I7SUFDaEM7OztPQUdHO0lBQ0gsaUVBQXVDLENBQUE7SUFFdkM7OztPQUdHO0lBQ0gseURBQStCLENBQUE7SUFFL0I7OztPQUdH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9mIHNxdWFyZWQgZGlmZmVyZW5jZXMgYmV0d2VlbiBlYWNoIGVsZW1lbnQuXG4gICAqIFNtYWxsZXIgaXMgYmV0dGVyLiBSYW5nZXMgZnJvbSAwIHRvIGluZmluaXR5LlxuICAgKi9cbiAgRVVDTElERUFOX1NJTUlMQVJJVFkgPSAnRVVDTElERUFOX1NJTUlMQVJJVFknLFxufVxuXG5leHBvcnQgaW50ZXJmYWNlIElWZWN0b3JJbmRleENvbnRyb2xDbGllbnQge1xuICBjcmVhdGVJbmRleChcbiAgICBpbmRleE5hbWU6IHN0cmluZyxcbiAgICBudW1EaW1lbnNpb25zOiBudW1iZXIsXG4gICAgc2ltaWxhcml0eU1ldHJpYz86IFZlY3RvclNpbWlsYXJpdHlNZXRyaWNcbiAgKTogUHJvbWlzZTxDcmVhdGVWZWN0b3JJbmRleC5SZXNwb25zZT47XG4gIGxpc3RJbmRleGVzKCk6IFByb21pc2U8TGlzdFZlY3RvckluZGV4ZXMuUmVzcG9uc2U+O1xuICBkZWxldGVJbmRleChpbmRleE5hbWU6IHN0cmluZyk6IFByb21pc2U8RGVsZXRlVmVjdG9ySW5kZXguUmVzcG9uc2U+O1xufVxuIl19
@@ -1,13 +0,0 @@
1
- import { VectorCountItems, VectorDeleteItemBatch, VectorGetItemBatch, VectorGetItemMetadataBatch, VectorSearch, VectorSearchAndFetchVectors, VectorUpsertItemBatch } from '../../../messages/responses/vector';
2
- import { VectorIndexItem } from '../../../messages/vector-index';
3
- import { SearchOptions } from '../../../clients/IVectorIndexClient';
4
- import { VectorFilterExpression } from '../../../messages/vector-index-filters';
5
- export interface IVectorIndexDataClient {
6
- countItems(indexName: string): Promise<VectorCountItems.Response>;
7
- upsertItemBatch(indexName: string, items: Array<VectorIndexItem>): Promise<VectorUpsertItemBatch.Response>;
8
- search(indexName: string, queryVector: Array<number>, options?: SearchOptions): Promise<VectorSearch.Response>;
9
- searchAndFetchVectors(indexName: string, queryVector: Array<number>, options?: SearchOptions): Promise<VectorSearchAndFetchVectors.Response>;
10
- deleteItemBatch(indexName: string, filter: VectorFilterExpression | Array<string>): Promise<VectorDeleteItemBatch.Response>;
11
- getItemBatch(indexName: string, filter: Array<string>): Promise<VectorGetItemBatch.Response>;
12
- getItemMetadataBatch(indexName: string, filter: Array<string>): Promise<VectorGetItemMetadataBatch.Response>;
13
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSVZlY3RvckluZGV4RGF0YUNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9pbnRlcm5hbC9jbGllbnRzL3ZlY3Rvci9JVmVjdG9ySW5kZXhEYXRhQ2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICBWZWN0b3JDb3VudEl0ZW1zLFxuICBWZWN0b3JEZWxldGVJdGVtQmF0Y2gsXG4gIFZlY3RvckdldEl0ZW1CYXRjaCxcbiAgVmVjdG9yR2V0SXRlbU1ldGFkYXRhQmF0Y2gsXG4gIFZlY3RvclNlYXJjaCxcbiAgVmVjdG9yU2VhcmNoQW5kRmV0Y2hWZWN0b3JzLFxuICBWZWN0b3JVcHNlcnRJdGVtQmF0Y2gsXG59IGZyb20gJy4uLy4uLy4uL21lc3NhZ2VzL3Jlc3BvbnNlcy92ZWN0b3InO1xuaW1wb3J0IHtWZWN0b3JJbmRleEl0ZW19IGZyb20gJy4uLy4uLy4uL21lc3NhZ2VzL3ZlY3Rvci1pbmRleCc7XG5pbXBvcnQge1NlYXJjaE9wdGlvbnN9IGZyb20gJy4uLy4uLy4uL2NsaWVudHMvSVZlY3RvckluZGV4Q2xpZW50JztcbmltcG9ydCB7VmVjdG9yRmlsdGVyRXhwcmVzc2lvbn0gZnJvbSA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cm9taXNlPFZlY3RvckdldEl0ZW1CYXRjaC5SZXNwb25zZT47XG5cbiAgZ2V0SXRlbU1ldGFkYXRhQmF0Y2goXG4gICAgaW5kZXhOYW1lOiBzdHJpbmcsXG4gICAgZmlsdGVyOiBBcnJheTxzdHJpbmc+XG4gICk6IFByb21pc2U8VmVjdG9yR2V0SXRlbU1ldGFkYXRhQmF0Y2guUmVzcG9uc2U+O1xufVxuIl19
@@ -1,3 +0,0 @@
1
- export * from './AbstractVectorIndexClient';
2
- export * from './IVectorIndexControlClient';
3
- export * from '../../../clients/IVectorIndexClient';
@@ -1,20 +0,0 @@
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
- __exportStar(require("./AbstractVectorIndexClient"), exports);
18
- __exportStar(require("./IVectorIndexControlClient"), exports);
19
- __exportStar(require("../../../clients/IVectorIndexClient"), exports);
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvaW50ZXJuYWwvY2xpZW50cy92ZWN0b3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhEQUE0QztBQUM1Qyw4REFBNEM7QUFDNUMsc0VBQW9EIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9BYnN0cmFjdFZlY3RvckluZGV4Q2xpZW50JztcbmV4cG9ydCAqIGZyb20gJy4vSVZlY3RvckluZGV4Q29udHJvbENsaWVudCc7XG5leHBvcnQgKiBmcm9tICcuLi8uLi8uLi9jbGllbnRzL0lWZWN0b3JJbmRleENsaWVudCc7XG4iXX0=
@@ -1,67 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { ResponseBase } from '../response-base';
3
- /**
4
- * Parent response type for a CreateVectorIndex request. The
5
- * response object is resolved to a type-safe object of one of
6
- * the following subtypes:
7
- *
8
- * - {Success}
9
- * - {AlreadyExists}
10
- * - {Error}
11
- *
12
- * `instanceof` type guards can be used to operate on the appropriate subtype.
13
- * @example
14
- * For example:
15
- * ```
16
- * if (response instanceof CreateVectorIndex.Error) {
17
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
18
- * // `CreateIndex.Error` in this block, so you will have access to the properties
19
- * // of the Error class; e.g. `response.errorCode()`.
20
- * }
21
- * ```
22
- */
23
- export declare abstract class Response extends ResponseBase {
24
- }
25
- declare class _Success extends Response {
26
- }
27
- declare const Success_base: {
28
- new (...args: any[]): {
29
- readonly is_success: boolean;
30
- };
31
- } & typeof _Success;
32
- /**
33
- * Indicates a Successful CreateVectorIndex request.
34
- */
35
- export declare class Success extends Success_base {
36
- }
37
- declare class _Error extends Response {
38
- protected _innerException: SdkError;
39
- constructor(_innerException: SdkError);
40
- }
41
- declare const Error_base: {
42
- new (...args: any[]): {
43
- _innerException: SdkError;
44
- message(): string;
45
- innerException(): SdkError;
46
- errorCode(): import("../../../errors").MomentoErrorCode;
47
- toString(): string;
48
- };
49
- } & typeof _Error;
50
- /**
51
- * Indicates that an error occurred during the CreateVectorIndex request.
52
- *
53
- * This response object includes the following fields that you can use to determine
54
- * how you would like to handle the error:
55
- *
56
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
57
- * - `message()` - a human-readable description of the error
58
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
59
- */
60
- export declare class Error extends Error_base {
61
- }
62
- /**
63
- * Indicates that the index already exists, so there was nothing to do.
64
- */
65
- export declare class AlreadyExists extends Response {
66
- }
67
- export {};
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlreadyExists = exports.Error = exports.Success = exports.Response = void 0;
4
- const response_base_1 = require("../response-base");
5
- /**
6
- * Parent response type for a CreateVectorIndex request. The
7
- * response object is resolved to a type-safe object of one of
8
- * the following subtypes:
9
- *
10
- * - {Success}
11
- * - {AlreadyExists}
12
- * - {Error}
13
- *
14
- * `instanceof` type guards can be used to operate on the appropriate subtype.
15
- * @example
16
- * For example:
17
- * ```
18
- * if (response instanceof CreateVectorIndex.Error) {
19
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
20
- * // `CreateIndex.Error` in this block, so you will have access to the properties
21
- * // of the Error class; e.g. `response.errorCode()`.
22
- * }
23
- * ```
24
- */
25
- class Response extends response_base_1.ResponseBase {
26
- }
27
- exports.Response = Response;
28
- class _Success extends Response {
29
- }
30
- /**
31
- * Indicates a Successful CreateVectorIndex request.
32
- */
33
- class Success extends (0, response_base_1.ResponseSuccess)(_Success) {
34
- }
35
- exports.Success = Success;
36
- class _Error extends Response {
37
- constructor(_innerException) {
38
- super();
39
- this._innerException = _innerException;
40
- }
41
- }
42
- /**
43
- * Indicates that an error occurred during the CreateVectorIndex request.
44
- *
45
- * This response object includes the following fields that you can use to determine
46
- * how you would like to handle the error:
47
- *
48
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
49
- * - `message()` - a human-readable description of the error
50
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
51
- */
52
- class Error extends (0, response_base_1.ResponseError)(_Error) {
53
- }
54
- exports.Error = Error;
55
- /**
56
- * Indicates that the index already exists, so there was nothing to do.
57
- */
58
- class Alre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i9cbmV4cG9ydCBjbGFzcyBBbHJlYWR5RXhpc3RzIGV4dGVuZHMgUmVzcG9uc2Uge31cbiJdfQ==
@@ -1,61 +0,0 @@
1
- import { SdkError } from '../../../errors';
2
- import { ResponseBase } from '../response-base';
3
- /**
4
- * Parent response type for a delete index request. The
5
- * response object is resolved to a type-safe object of one of
6
- * the following subtypes:
7
- *
8
- * - {Success}
9
- * - {Error}
10
- *
11
- * `instanceof` type guards can be used to operate on the appropriate subtype.
12
- * @example
13
- * For example:
14
- * ```
15
- * if (response instanceof DeleteIndex.Error) {
16
- * // Handle error as appropriate. The compiler will smart-cast `response` to type
17
- * // `DeleteIndex.Error` in this block, so you will have access to the properties
18
- * // of the Error class; e.g. `response.errorCode()`.
19
- * }
20
- * ```
21
- */
22
- export declare abstract class Response extends ResponseBase {
23
- }
24
- declare class _Success extends Response {
25
- }
26
- declare const Success_base: {
27
- new (...args: any[]): {
28
- readonly is_success: boolean;
29
- };
30
- } & typeof _Success;
31
- /**
32
- * Indicates a Successful delete index request.
33
- */
34
- export declare class Success extends Success_base {
35
- }
36
- declare class _Error extends Response {
37
- protected _innerException: SdkError;
38
- constructor(_innerException: SdkError);
39
- }
40
- declare const Error_base: {
41
- new (...args: any[]): {
42
- _innerException: SdkError;
43
- message(): string;
44
- innerException(): SdkError;
45
- errorCode(): import("../../../errors").MomentoErrorCode;
46
- toString(): string;
47
- };
48
- } & typeof _Error;
49
- /**
50
- * Indicates that an error occurred during the delete index request.
51
- *
52
- * This response object includes the following fields that you can use to determine
53
- * how you would like to handle the error:
54
- *
55
- * - `errorCode()` - a unique Momento error code indicating the type of error that occurred.
56
- * - `message()` - a human-readable description of the error
57
- * - `innerException()` - the original error that caused the failure; can be re-thrown.
58
- */
59
- export declare class Error extends Error_base {
60
- }
61
- export {};