@supabase/storage-js 2.87.4-canary.2 → 2.87.4-canary.4
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.
- package/README.md +2 -106
- package/dist/index.cjs +3019 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2601 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +2601 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2998 -0
- package/dist/index.mjs.map +1 -0
- package/dist/umd/supabase.js +1 -1
- package/package.json +21 -12
- package/src/lib/version.ts +1 -1
- package/dist/main/StorageClient.d.ts +0 -64
- package/dist/main/StorageClient.d.ts.map +0 -1
- package/dist/main/StorageClient.js +0 -74
- package/dist/main/StorageClient.js.map +0 -1
- package/dist/main/index.d.ts +0 -7
- package/dist/main/index.d.ts.map +0 -1
- package/dist/main/index.js +0 -12
- package/dist/main/index.js.map +0 -1
- package/dist/main/lib/constants.d.ts +0 -4
- package/dist/main/lib/constants.d.ts.map +0 -1
- package/dist/main/lib/constants.js +0 -8
- package/dist/main/lib/constants.js.map +0 -1
- package/dist/main/lib/errors.d.ts +0 -21
- package/dist/main/lib/errors.d.ts.map +0 -1
- package/dist/main/lib/errors.js +0 -41
- package/dist/main/lib/errors.js.map +0 -1
- package/dist/main/lib/fetch.d.ts +0 -16
- package/dist/main/lib/fetch.d.ts.map +0 -1
- package/dist/main/lib/fetch.js +0 -95
- package/dist/main/lib/fetch.js.map +0 -1
- package/dist/main/lib/helpers.d.ts +0 -28
- package/dist/main/lib/helpers.d.ts.map +0 -1
- package/dist/main/lib/helpers.js +0 -87
- package/dist/main/lib/helpers.js.map +0 -1
- package/dist/main/lib/index.d.ts +0 -6
- package/dist/main/lib/index.d.ts.map +0 -1
- package/dist/main/lib/index.js +0 -9
- package/dist/main/lib/index.js.map +0 -1
- package/dist/main/lib/types.d.ts +0 -226
- package/dist/main/lib/types.d.ts.map +0 -1
- package/dist/main/lib/types.js +0 -3
- package/dist/main/lib/types.js.map +0 -1
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts +0 -505
- package/dist/main/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
- package/dist/main/lib/vectors/StorageVectorsClient.js +0 -582
- package/dist/main/lib/vectors/StorageVectorsClient.js.map +0 -1
- package/dist/main/lib/vectors/VectorBucketApi.d.ts +0 -32
- package/dist/main/lib/vectors/VectorBucketApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorBucketApi.js +0 -102
- package/dist/main/lib/vectors/VectorBucketApi.js.map +0 -1
- package/dist/main/lib/vectors/VectorDataApi.d.ts +0 -32
- package/dist/main/lib/vectors/VectorDataApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorDataApi.js +0 -147
- package/dist/main/lib/vectors/VectorDataApi.js.map +0 -1
- package/dist/main/lib/vectors/VectorIndexApi.d.ts +0 -47
- package/dist/main/lib/vectors/VectorIndexApi.d.ts.map +0 -1
- package/dist/main/lib/vectors/VectorIndexApi.js +0 -104
- package/dist/main/lib/vectors/VectorIndexApi.js.map +0 -1
- package/dist/main/lib/vectors/constants.d.ts +0 -5
- package/dist/main/lib/vectors/constants.d.ts.map +0 -1
- package/dist/main/lib/vectors/constants.js +0 -9
- package/dist/main/lib/vectors/constants.js.map +0 -1
- package/dist/main/lib/vectors/errors.d.ts +0 -55
- package/dist/main/lib/vectors/errors.d.ts.map +0 -1
- package/dist/main/lib/vectors/errors.js +0 -76
- package/dist/main/lib/vectors/errors.js.map +0 -1
- package/dist/main/lib/vectors/fetch.d.ts +0 -57
- package/dist/main/lib/vectors/fetch.d.ts.map +0 -1
- package/dist/main/lib/vectors/fetch.js +0 -167
- package/dist/main/lib/vectors/fetch.js.map +0 -1
- package/dist/main/lib/vectors/helpers.d.ts +0 -46
- package/dist/main/lib/vectors/helpers.d.ts.map +0 -1
- package/dist/main/lib/vectors/helpers.js +0 -74
- package/dist/main/lib/vectors/helpers.js.map +0 -1
- package/dist/main/lib/vectors/index.d.ts +0 -11
- package/dist/main/lib/vectors/index.d.ts.map +0 -1
- package/dist/main/lib/vectors/index.js +0 -31
- package/dist/main/lib/vectors/index.js.map +0 -1
- package/dist/main/lib/vectors/types.d.ts +0 -279
- package/dist/main/lib/vectors/types.d.ts.map +0 -1
- package/dist/main/lib/vectors/types.js +0 -3
- package/dist/main/lib/vectors/types.js.map +0 -1
- package/dist/main/lib/version.d.ts +0 -2
- package/dist/main/lib/version.d.ts.map +0 -1
- package/dist/main/lib/version.js +0 -11
- package/dist/main/lib/version.js.map +0 -1
- package/dist/main/packages/BlobDownloadBuilder.d.ts +0 -16
- package/dist/main/packages/BlobDownloadBuilder.d.ts.map +0 -1
- package/dist/main/packages/BlobDownloadBuilder.js +0 -55
- package/dist/main/packages/BlobDownloadBuilder.js.map +0 -1
- package/dist/main/packages/StorageAnalyticsClient.d.ts +0 -324
- package/dist/main/packages/StorageAnalyticsClient.d.ts.map +0 -1
- package/dist/main/packages/StorageAnalyticsClient.js +0 -395
- package/dist/main/packages/StorageAnalyticsClient.js.map +0 -1
- package/dist/main/packages/StorageBucketApi.d.ts +0 -266
- package/dist/main/packages/StorageBucketApi.d.ts.map +0 -1
- package/dist/main/packages/StorageBucketApi.js +0 -362
- package/dist/main/packages/StorageBucketApi.js.map +0 -1
- package/dist/main/packages/StorageFileApi.d.ts +0 -680
- package/dist/main/packages/StorageFileApi.d.ts.map +0 -1
- package/dist/main/packages/StorageFileApi.js +0 -1002
- package/dist/main/packages/StorageFileApi.js.map +0 -1
- package/dist/main/packages/StreamDownloadBuilder.d.ts +0 -9
- package/dist/main/packages/StreamDownloadBuilder.d.ts.map +0 -1
- package/dist/main/packages/StreamDownloadBuilder.js +0 -35
- package/dist/main/packages/StreamDownloadBuilder.js.map +0 -1
- package/dist/module/StorageClient.d.ts +0 -64
- package/dist/module/StorageClient.d.ts.map +0 -1
- package/dist/module/StorageClient.js +0 -69
- package/dist/module/StorageClient.js.map +0 -1
- package/dist/module/index.d.ts +0 -7
- package/dist/module/index.d.ts.map +0 -1
- package/dist/module/index.js +0 -6
- package/dist/module/index.js.map +0 -1
- package/dist/module/lib/constants.d.ts +0 -4
- package/dist/module/lib/constants.d.ts.map +0 -1
- package/dist/module/lib/constants.js +0 -5
- package/dist/module/lib/constants.js.map +0 -1
- package/dist/module/lib/errors.d.ts +0 -21
- package/dist/module/lib/errors.d.ts.map +0 -1
- package/dist/module/lib/errors.js +0 -34
- package/dist/module/lib/errors.js.map +0 -1
- package/dist/module/lib/fetch.d.ts +0 -16
- package/dist/module/lib/fetch.d.ts.map +0 -1
- package/dist/module/lib/fetch.js +0 -88
- package/dist/module/lib/fetch.js.map +0 -1
- package/dist/module/lib/helpers.d.ts +0 -28
- package/dist/module/lib/helpers.d.ts.map +0 -1
- package/dist/module/lib/helpers.js +0 -79
- package/dist/module/lib/helpers.js.map +0 -1
- package/dist/module/lib/index.d.ts +0 -6
- package/dist/module/lib/index.d.ts.map +0 -1
- package/dist/module/lib/index.js +0 -6
- package/dist/module/lib/index.js.map +0 -1
- package/dist/module/lib/types.d.ts +0 -226
- package/dist/module/lib/types.d.ts.map +0 -1
- package/dist/module/lib/types.js +0 -2
- package/dist/module/lib/types.js.map +0 -1
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts +0 -505
- package/dist/module/lib/vectors/StorageVectorsClient.d.ts.map +0 -1
- package/dist/module/lib/vectors/StorageVectorsClient.js +0 -576
- package/dist/module/lib/vectors/StorageVectorsClient.js.map +0 -1
- package/dist/module/lib/vectors/VectorBucketApi.d.ts +0 -32
- package/dist/module/lib/vectors/VectorBucketApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorBucketApi.js +0 -99
- package/dist/module/lib/vectors/VectorBucketApi.js.map +0 -1
- package/dist/module/lib/vectors/VectorDataApi.d.ts +0 -32
- package/dist/module/lib/vectors/VectorDataApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorDataApi.js +0 -144
- package/dist/module/lib/vectors/VectorDataApi.js.map +0 -1
- package/dist/module/lib/vectors/VectorIndexApi.d.ts +0 -47
- package/dist/module/lib/vectors/VectorIndexApi.d.ts.map +0 -1
- package/dist/module/lib/vectors/VectorIndexApi.js +0 -101
- package/dist/module/lib/vectors/VectorIndexApi.js.map +0 -1
- package/dist/module/lib/vectors/constants.d.ts +0 -5
- package/dist/module/lib/vectors/constants.d.ts.map +0 -1
- package/dist/module/lib/vectors/constants.js +0 -6
- package/dist/module/lib/vectors/constants.js.map +0 -1
- package/dist/module/lib/vectors/errors.d.ts +0 -55
- package/dist/module/lib/vectors/errors.d.ts.map +0 -1
- package/dist/module/lib/vectors/errors.js +0 -69
- package/dist/module/lib/vectors/errors.js.map +0 -1
- package/dist/module/lib/vectors/fetch.d.ts +0 -57
- package/dist/module/lib/vectors/fetch.d.ts.map +0 -1
- package/dist/module/lib/vectors/fetch.js +0 -161
- package/dist/module/lib/vectors/fetch.js.map +0 -1
- package/dist/module/lib/vectors/helpers.d.ts +0 -46
- package/dist/module/lib/vectors/helpers.d.ts.map +0 -1
- package/dist/module/lib/vectors/helpers.js +0 -66
- package/dist/module/lib/vectors/helpers.js.map +0 -1
- package/dist/module/lib/vectors/index.d.ts +0 -11
- package/dist/module/lib/vectors/index.d.ts.map +0 -1
- package/dist/module/lib/vectors/index.js +0 -11
- package/dist/module/lib/vectors/index.js.map +0 -1
- package/dist/module/lib/vectors/types.d.ts +0 -279
- package/dist/module/lib/vectors/types.d.ts.map +0 -1
- package/dist/module/lib/vectors/types.js +0 -2
- package/dist/module/lib/vectors/types.js.map +0 -1
- package/dist/module/lib/version.d.ts +0 -2
- package/dist/module/lib/version.d.ts.map +0 -1
- package/dist/module/lib/version.js +0 -8
- package/dist/module/lib/version.js.map +0 -1
- package/dist/module/packages/BlobDownloadBuilder.d.ts +0 -16
- package/dist/module/packages/BlobDownloadBuilder.d.ts.map +0 -1
- package/dist/module/packages/BlobDownloadBuilder.js +0 -53
- package/dist/module/packages/BlobDownloadBuilder.js.map +0 -1
- package/dist/module/packages/StorageAnalyticsClient.d.ts +0 -324
- package/dist/module/packages/StorageAnalyticsClient.d.ts.map +0 -1
- package/dist/module/packages/StorageAnalyticsClient.js +0 -392
- package/dist/module/packages/StorageAnalyticsClient.js.map +0 -1
- package/dist/module/packages/StorageBucketApi.d.ts +0 -266
- package/dist/module/packages/StorageBucketApi.d.ts.map +0 -1
- package/dist/module/packages/StorageBucketApi.js +0 -359
- package/dist/module/packages/StorageBucketApi.js.map +0 -1
- package/dist/module/packages/StorageFileApi.d.ts +0 -680
- package/dist/module/packages/StorageFileApi.d.ts.map +0 -1
- package/dist/module/packages/StorageFileApi.js +0 -999
- package/dist/module/packages/StorageFileApi.js.map +0 -1
- package/dist/module/packages/StreamDownloadBuilder.d.ts +0 -9
- package/dist/module/packages/StreamDownloadBuilder.d.ts.map +0 -1
- package/dist/module/packages/StreamDownloadBuilder.js +0 -32
- package/dist/module/packages/StreamDownloadBuilder.js.map +0 -1
- package/dist/tsconfig.module.tsbuildinfo +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { StorageVectorsError } from './errors';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for encryption at rest
|
|
4
|
-
* @property kmsKeyArn - ARN of the KMS key used for encryption
|
|
5
|
-
* @property sseType - Server-side encryption type (e.g., 'KMS')
|
|
6
|
-
*/
|
|
7
|
-
export interface EncryptionConfiguration {
|
|
8
|
-
kmsKeyArn?: string;
|
|
9
|
-
sseType?: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Vector bucket metadata
|
|
13
|
-
* @property vectorBucketName - Unique name of the vector bucket
|
|
14
|
-
* @property creationTime - Unix timestamp of when the bucket was created
|
|
15
|
-
* @property encryptionConfiguration - Optional encryption settings
|
|
16
|
-
*/
|
|
17
|
-
export interface VectorBucket {
|
|
18
|
-
vectorBucketName: string;
|
|
19
|
-
creationTime?: number;
|
|
20
|
-
encryptionConfiguration?: EncryptionConfiguration;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Metadata configuration for vector index
|
|
24
|
-
* Defines which metadata keys should not be indexed for filtering
|
|
25
|
-
* @property nonFilterableMetadataKeys - Array of metadata keys that cannot be used in filters
|
|
26
|
-
*/
|
|
27
|
-
export interface MetadataConfiguration {
|
|
28
|
-
nonFilterableMetadataKeys?: string[];
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Supported data types for vectors
|
|
32
|
-
* Currently only float32 is supported
|
|
33
|
-
*/
|
|
34
|
-
export type VectorDataType = 'float32';
|
|
35
|
-
/**
|
|
36
|
-
* Distance metrics for vector similarity search
|
|
37
|
-
*/
|
|
38
|
-
export type DistanceMetric = 'cosine' | 'euclidean' | 'dotproduct';
|
|
39
|
-
/**
|
|
40
|
-
* Vector index configuration and metadata
|
|
41
|
-
* @property indexName - Unique name of the index within the bucket
|
|
42
|
-
* @property vectorBucketName - Name of the parent vector bucket
|
|
43
|
-
* @property dataType - Data type of vector components (currently only 'float32')
|
|
44
|
-
* @property dimension - Dimensionality of vectors (e.g., 384, 768, 1536)
|
|
45
|
-
* @property distanceMetric - Similarity metric used for queries
|
|
46
|
-
* @property metadataConfiguration - Configuration for metadata filtering
|
|
47
|
-
* @property creationTime - Unix timestamp of when the index was created
|
|
48
|
-
*/
|
|
49
|
-
export interface VectorIndex {
|
|
50
|
-
indexName: string;
|
|
51
|
-
vectorBucketName: string;
|
|
52
|
-
dataType: VectorDataType;
|
|
53
|
-
dimension: number;
|
|
54
|
-
distanceMetric: DistanceMetric;
|
|
55
|
-
metadataConfiguration?: MetadataConfiguration;
|
|
56
|
-
creationTime?: number;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Vector data representation
|
|
60
|
-
* Vectors must be float32 arrays with dimensions matching the index
|
|
61
|
-
* @property float32 - Array of 32-bit floating point numbers
|
|
62
|
-
*/
|
|
63
|
-
export interface VectorData {
|
|
64
|
-
float32: number[];
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Arbitrary JSON metadata attached to vectors
|
|
68
|
-
* Keys configured as non-filterable in the index can be stored but not queried
|
|
69
|
-
*/
|
|
70
|
-
export type VectorMetadata = Record<string, any>;
|
|
71
|
-
/**
|
|
72
|
-
* Single vector object for insertion/update
|
|
73
|
-
* @property key - Unique identifier for the vector
|
|
74
|
-
* @property data - Vector embedding data
|
|
75
|
-
* @property metadata - Optional arbitrary metadata
|
|
76
|
-
*/
|
|
77
|
-
export interface VectorObject {
|
|
78
|
-
key: string;
|
|
79
|
-
data: VectorData;
|
|
80
|
-
metadata?: VectorMetadata;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Vector object returned from queries with optional distance
|
|
84
|
-
* @property key - Unique identifier for the vector
|
|
85
|
-
* @property data - Vector embedding data (if requested)
|
|
86
|
-
* @property metadata - Arbitrary metadata (if requested)
|
|
87
|
-
* @property distance - Similarity distance from query vector (if requested)
|
|
88
|
-
*/
|
|
89
|
-
export interface VectorMatch {
|
|
90
|
-
key: string;
|
|
91
|
-
data?: VectorData;
|
|
92
|
-
metadata?: VectorMetadata;
|
|
93
|
-
distance?: number;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Options for fetching vector buckets
|
|
97
|
-
* @property prefix - Filter buckets by name prefix
|
|
98
|
-
* @property maxResults - Maximum number of results to return (default: 100)
|
|
99
|
-
* @property nextToken - Token for pagination from previous response
|
|
100
|
-
*/
|
|
101
|
-
export interface ListVectorBucketsOptions {
|
|
102
|
-
prefix?: string;
|
|
103
|
-
maxResults?: number;
|
|
104
|
-
nextToken?: string;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Response from listing vector buckets
|
|
108
|
-
* @property vectorBuckets - Array of bucket names
|
|
109
|
-
* @property nextToken - Token for fetching next page (if more results exist)
|
|
110
|
-
*/
|
|
111
|
-
export interface ListVectorBucketsResponse {
|
|
112
|
-
vectorBuckets: {
|
|
113
|
-
vectorBucketName: string;
|
|
114
|
-
}[];
|
|
115
|
-
nextToken?: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Options for listing indexes within a bucket
|
|
119
|
-
* @property vectorBucketName - Name of the parent vector bucket
|
|
120
|
-
* @property prefix - Filter indexes by name prefix
|
|
121
|
-
* @property maxResults - Maximum number of results to return (default: 100)
|
|
122
|
-
* @property nextToken - Token for pagination from previous response
|
|
123
|
-
*/
|
|
124
|
-
export interface ListIndexesOptions {
|
|
125
|
-
vectorBucketName: string;
|
|
126
|
-
prefix?: string;
|
|
127
|
-
maxResults?: number;
|
|
128
|
-
nextToken?: string;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Response from listing indexes
|
|
132
|
-
* @property indexes - Array of index names
|
|
133
|
-
* @property nextToken - Token for fetching next page (if more results exist)
|
|
134
|
-
*/
|
|
135
|
-
export interface ListIndexesResponse {
|
|
136
|
-
indexes: {
|
|
137
|
-
indexName: string;
|
|
138
|
-
}[];
|
|
139
|
-
nextToken?: string;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Options for batch reading vectors
|
|
143
|
-
* @property vectorBucketName - Name of the vector bucket
|
|
144
|
-
* @property indexName - Name of the index
|
|
145
|
-
* @property keys - Array of vector keys to retrieve
|
|
146
|
-
* @property returnData - Whether to include vector data in response
|
|
147
|
-
* @property returnMetadata - Whether to include metadata in response
|
|
148
|
-
*/
|
|
149
|
-
export interface GetVectorsOptions {
|
|
150
|
-
vectorBucketName: string;
|
|
151
|
-
indexName: string;
|
|
152
|
-
keys: string[];
|
|
153
|
-
returnData?: boolean;
|
|
154
|
-
returnMetadata?: boolean;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Response from getting vectors
|
|
158
|
-
* @property vectors - Array of retrieved vector objects
|
|
159
|
-
*/
|
|
160
|
-
export interface GetVectorsResponse {
|
|
161
|
-
vectors: VectorMatch[];
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Options for batch inserting/updating vectors
|
|
165
|
-
* @property vectorBucketName - Name of the vector bucket
|
|
166
|
-
* @property indexName - Name of the index
|
|
167
|
-
* @property vectors - Array of vectors to insert/upsert (1-500 items)
|
|
168
|
-
*/
|
|
169
|
-
export interface PutVectorsOptions {
|
|
170
|
-
vectorBucketName: string;
|
|
171
|
-
indexName: string;
|
|
172
|
-
vectors: VectorObject[];
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Options for batch deleting vectors
|
|
176
|
-
* @property vectorBucketName - Name of the vector bucket
|
|
177
|
-
* @property indexName - Name of the index
|
|
178
|
-
* @property keys - Array of vector keys to delete (1-500 items)
|
|
179
|
-
*/
|
|
180
|
-
export interface DeleteVectorsOptions {
|
|
181
|
-
vectorBucketName: string;
|
|
182
|
-
indexName: string;
|
|
183
|
-
keys: string[];
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Options for listing/scanning vectors in an index
|
|
187
|
-
* Supports parallel scanning via segment configuration
|
|
188
|
-
* @property vectorBucketName - Name of the vector bucket
|
|
189
|
-
* @property indexName - Name of the index
|
|
190
|
-
* @property maxResults - Maximum number of results to return (default: 500, max: 1000)
|
|
191
|
-
* @property nextToken - Token for pagination from previous response
|
|
192
|
-
* @property returnData - Whether to include vector data in response
|
|
193
|
-
* @property returnMetadata - Whether to include metadata in response
|
|
194
|
-
* @property segmentCount - Total number of parallel segments (1-16)
|
|
195
|
-
* @property segmentIndex - Zero-based index of this segment (0 to segmentCount-1)
|
|
196
|
-
*/
|
|
197
|
-
export interface ListVectorsOptions {
|
|
198
|
-
vectorBucketName: string;
|
|
199
|
-
indexName: string;
|
|
200
|
-
maxResults?: number;
|
|
201
|
-
nextToken?: string;
|
|
202
|
-
returnData?: boolean;
|
|
203
|
-
returnMetadata?: boolean;
|
|
204
|
-
segmentCount?: number;
|
|
205
|
-
segmentIndex?: number;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Response from listing vectors
|
|
209
|
-
* @property vectors - Array of vector objects
|
|
210
|
-
* @property nextToken - Token for fetching next page (if more results exist)
|
|
211
|
-
*/
|
|
212
|
-
export interface ListVectorsResponse {
|
|
213
|
-
vectors: VectorMatch[];
|
|
214
|
-
nextToken?: string;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* JSON filter expression for metadata filtering
|
|
218
|
-
* Format and syntax depend on the S3 Vectors service implementation
|
|
219
|
-
*/
|
|
220
|
-
export type VectorFilter = Record<string, any>;
|
|
221
|
-
/**
|
|
222
|
-
* Options for querying similar vectors (ANN search)
|
|
223
|
-
* @property vectorBucketName - Name of the vector bucket
|
|
224
|
-
* @property indexName - Name of the index
|
|
225
|
-
* @property queryVector - Query vector to find similar vectors
|
|
226
|
-
* @property topK - Number of nearest neighbors to return (default: 10)
|
|
227
|
-
* @property filter - Optional JSON filter for metadata
|
|
228
|
-
* @property returnDistance - Whether to include distance scores
|
|
229
|
-
* @property returnMetadata - Whether to include metadata in results
|
|
230
|
-
*/
|
|
231
|
-
export interface QueryVectorsOptions {
|
|
232
|
-
vectorBucketName: string;
|
|
233
|
-
indexName: string;
|
|
234
|
-
queryVector: VectorData;
|
|
235
|
-
topK?: number;
|
|
236
|
-
filter?: VectorFilter;
|
|
237
|
-
returnDistance?: boolean;
|
|
238
|
-
returnMetadata?: boolean;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Response from vector similarity query
|
|
242
|
-
* @property vectors - Array of similar vectors ordered by distance
|
|
243
|
-
* @property distanceMetric - The distance metric used for the similarity search
|
|
244
|
-
*/
|
|
245
|
-
export interface QueryVectorsResponse {
|
|
246
|
-
vectors: VectorMatch[];
|
|
247
|
-
distanceMetric?: DistanceMetric;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Fetch-specific parameters like abort signals
|
|
251
|
-
* @property signal - AbortSignal for cancelling requests
|
|
252
|
-
*/
|
|
253
|
-
export interface VectorFetchParameters {
|
|
254
|
-
signal?: AbortSignal;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Standard response wrapper for successful operations
|
|
258
|
-
* @property data - Response data of type T
|
|
259
|
-
* @property error - Null on success
|
|
260
|
-
*/
|
|
261
|
-
export interface SuccessResponse<T> {
|
|
262
|
-
data: T;
|
|
263
|
-
error: null;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Standard response wrapper for failed operations
|
|
267
|
-
* @property data - Null on error
|
|
268
|
-
* @property error - StorageVectorsError with details
|
|
269
|
-
*/
|
|
270
|
-
export interface ErrorResponse {
|
|
271
|
-
data: null;
|
|
272
|
-
error: StorageVectorsError;
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Union type for all API responses
|
|
276
|
-
* Follows the pattern: { data: T, error: null } | { data: null, error: Error }
|
|
277
|
-
*/
|
|
278
|
-
export type ApiResponse<T> = SuccessResponse<T> | ErrorResponse;
|
|
279
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/vectors/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAA;CACrC;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAA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EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE9C;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,UAAU,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,IAAI,CAAA;CACZ;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,mBAAmB,CAAA;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/vectors/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,oBAAoB,CAAA"}
|
package/dist/main/lib/version.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.version = void 0;
|
|
4
|
-
// Generated automatically during releases by scripts/update-version-files.ts
|
|
5
|
-
// This file provides runtime access to the package version for:
|
|
6
|
-
// - HTTP request headers (e.g., X-Client-Info header for API requests)
|
|
7
|
-
// - Debugging and support (identifying which version is running)
|
|
8
|
-
// - Telemetry and logging (version reporting in errors/analytics)
|
|
9
|
-
// - Ensuring build artifacts match the published package version
|
|
10
|
-
exports.version = '2.87.4-canary.2';
|
|
11
|
-
//# sourceMappingURL=version.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,gEAAgE;AAChE,uEAAuE;AACvE,iEAAiE;AACjE,kEAAkE;AAClE,iEAAiE;AACpD,QAAA,OAAO,GAAG,iBAAiB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DownloadResult } from '../lib/types';
|
|
2
|
-
import StreamDownloadBuilder from './StreamDownloadBuilder';
|
|
3
|
-
export default class BlobDownloadBuilder implements Promise<DownloadResult<Blob>> {
|
|
4
|
-
private downloadFn;
|
|
5
|
-
private shouldThrowOnError;
|
|
6
|
-
readonly [Symbol.toStringTag]: string;
|
|
7
|
-
private promise;
|
|
8
|
-
constructor(downloadFn: () => Promise<Response>, shouldThrowOnError: boolean);
|
|
9
|
-
asStream(): StreamDownloadBuilder;
|
|
10
|
-
then<TResult1 = DownloadResult<Blob>, TResult2 = never>(onfulfilled?: ((value: DownloadResult<Blob>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
11
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<DownloadResult<Blob> | TResult>;
|
|
12
|
-
finally(onfinally?: (() => void) | null): Promise<DownloadResult<Blob>>;
|
|
13
|
-
private getPromise;
|
|
14
|
-
private execute;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=BlobDownloadBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlobDownloadBuilder.d.ts","sourceRoot":"","sources":["../../../src/packages/BlobDownloadBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAE3D,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAK7E,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,kBAAkB;IAL5B,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,CAAwB;IAC7D,OAAO,CAAC,OAAO,CAA6C;gBAGlD,UAAU,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,EACnC,kBAAkB,EAAE,OAAO;IAGrC,QAAQ,IAAI,qBAAqB;IAIjC,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,EACpD,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,EACxF,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,GACtE,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAI/B,KAAK,CAAC,OAAO,GAAG,KAAK,EACnB,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,GACpE,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAI1C,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAIvE,OAAO,CAAC,UAAU;YAOJ,OAAO;CAoBtB"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const errors_1 = require("../lib/errors");
|
|
6
|
-
const StreamDownloadBuilder_1 = tslib_1.__importDefault(require("./StreamDownloadBuilder"));
|
|
7
|
-
class BlobDownloadBuilder {
|
|
8
|
-
constructor(downloadFn, shouldThrowOnError) {
|
|
9
|
-
this.downloadFn = downloadFn;
|
|
10
|
-
this.shouldThrowOnError = shouldThrowOnError;
|
|
11
|
-
this[_a] = 'BlobDownloadBuilder';
|
|
12
|
-
this.promise = null;
|
|
13
|
-
}
|
|
14
|
-
asStream() {
|
|
15
|
-
return new StreamDownloadBuilder_1.default(this.downloadFn, this.shouldThrowOnError);
|
|
16
|
-
}
|
|
17
|
-
then(onfulfilled, onrejected) {
|
|
18
|
-
return this.getPromise().then(onfulfilled, onrejected);
|
|
19
|
-
}
|
|
20
|
-
catch(onrejected) {
|
|
21
|
-
return this.getPromise().catch(onrejected);
|
|
22
|
-
}
|
|
23
|
-
finally(onfinally) {
|
|
24
|
-
return this.getPromise().finally(onfinally);
|
|
25
|
-
}
|
|
26
|
-
getPromise() {
|
|
27
|
-
if (!this.promise) {
|
|
28
|
-
this.promise = this.execute();
|
|
29
|
-
}
|
|
30
|
-
return this.promise;
|
|
31
|
-
}
|
|
32
|
-
execute() {
|
|
33
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
try {
|
|
35
|
-
const result = yield this.downloadFn();
|
|
36
|
-
return {
|
|
37
|
-
data: yield result.blob(),
|
|
38
|
-
error: null,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
if (this.shouldThrowOnError) {
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
if ((0, errors_1.isStorageError)(error)) {
|
|
46
|
-
return { data: null, error };
|
|
47
|
-
}
|
|
48
|
-
throw error;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
_a = Symbol.toStringTag;
|
|
54
|
-
exports.default = BlobDownloadBuilder;
|
|
55
|
-
//# sourceMappingURL=BlobDownloadBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlobDownloadBuilder.js","sourceRoot":"","sources":["../../../src/packages/BlobDownloadBuilder.ts"],"names":[],"mappings":";;;;AAAA,0CAA8C;AAE9C,4FAA2D;AAE3D,MAAqB,mBAAmB;IAItC,YACU,UAAmC,EACnC,kBAA2B;QAD3B,eAAU,GAAV,UAAU,CAAyB;QACnC,uBAAkB,GAAlB,kBAAkB,CAAS;QAL5B,QAAoB,GAAW,qBAAqB,CAAA;QACrD,YAAO,GAAyC,IAAI,CAAA;IAKzD,CAAC;IAEJ,QAAQ;QACN,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAA;IAC5E,CAAC;IAED,IAAI,CACF,WAAwF,EACxF,UAAuE;QAEvE,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAA;IACxD,CAAC;IAED,KAAK,CACH,UAAqE;QAErE,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,CAAC,SAA+B;QACrC,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC7C,CAAC;IAEO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