@mixedbread/sdk 0.4.0 → 0.6.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.
- package/CHANGELOG.md +69 -0
- package/README.md +2 -2
- package/api-promise.js +2 -15
- package/api-promise.js.map +1 -1
- package/bin/cli +52 -0
- package/bin/migration-config.json +176 -0
- package/client.d.mts +20 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -8
- package/client.d.ts.map +1 -1
- package/client.js +45 -50
- package/client.js.map +1 -1
- package/client.mjs +37 -19
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +0 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +0 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js +4 -14
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +1 -11
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +0 -1
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +0 -1
- package/core/error.d.ts.map +1 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +0 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +0 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +3 -13
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +1 -11
- package/core/pagination.mjs.map +1 -1
- package/error.js +2 -15
- package/error.js.map +1 -1
- package/internal/builtin-types.d.mts +0 -2
- package/internal/builtin-types.d.mts.map +1 -1
- package/internal/builtin-types.d.ts +0 -2
- package/internal/builtin-types.d.ts.map +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +2 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts +1 -2
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts +1 -2
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +3 -1
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +3 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts +0 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +0 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +1 -2
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.js +5 -6
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/to-file.d.mts +0 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +0 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +4 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +3 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +0 -1
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +0 -1
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +1 -3
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +1 -3
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +16 -6
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +12 -3
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +12 -7
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +12 -7
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts.map +1 -1
- package/internal/utils/env.d.ts.map +1 -1
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs.map +1 -1
- package/internal/utils/log.d.mts +0 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +0 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.d.mts.map +1 -1
- package/internal/utils/path.d.ts.map +1 -1
- package/internal/utils/path.js +2 -2
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/sleep.d.mts.map +1 -1
- package/internal/utils/sleep.d.ts.map +1 -1
- package/internal/utils/uuid.d.mts +1 -1
- package/internal/utils/uuid.d.mts.map +1 -1
- package/internal/utils/uuid.d.ts +1 -1
- package/internal/utils/uuid.d.ts.map +1 -1
- package/internal/utils/uuid.js +1 -2
- package/internal/utils/uuid.js.map +1 -1
- package/internal/utils/uuid.mjs +1 -2
- package/internal/utils/uuid.mjs.map +1 -1
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.js +7 -20
- package/internal/utils.js.map +1 -1
- package/lib/polling.js +1 -2
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs.map +1 -1
- package/package.json +5 -6
- package/pagination.js +2 -15
- package/pagination.js.map +1 -1
- package/resource.js +2 -15
- package/resource.js.map +1 -1
- package/resources/api-keys.d.mts +171 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +171 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +76 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +72 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/chat.d.mts +27 -0
- package/resources/chat.d.mts.map +1 -0
- package/resources/chat.d.ts +27 -0
- package/resources/chat.d.ts.map +1 -0
- package/resources/chat.js +28 -0
- package/resources/chat.js.map +1 -0
- package/resources/chat.mjs +24 -0
- package/resources/chat.mjs.map +1 -0
- package/resources/data-sources/connectors.d.mts +193 -0
- package/resources/data-sources/connectors.d.mts.map +1 -0
- package/resources/data-sources/connectors.d.ts +193 -0
- package/resources/data-sources/connectors.d.ts.map +1 -0
- package/resources/data-sources/connectors.js +73 -0
- package/resources/data-sources/connectors.js.map +1 -0
- package/resources/data-sources/connectors.mjs +69 -0
- package/resources/data-sources/connectors.mjs.map +1 -0
- package/resources/data-sources/data-sources.d.mts +183 -0
- package/resources/data-sources/data-sources.d.mts.map +1 -0
- package/resources/data-sources/data-sources.d.ts +183 -0
- package/resources/data-sources/data-sources.d.ts.map +1 -0
- package/resources/data-sources/data-sources.js +66 -0
- package/resources/data-sources/data-sources.js.map +1 -0
- package/resources/data-sources/data-sources.mjs +61 -0
- package/resources/data-sources/data-sources.mjs.map +1 -0
- package/resources/data-sources/index.d.mts +3 -0
- package/resources/data-sources/index.d.mts.map +1 -0
- package/resources/data-sources/index.d.ts +3 -0
- package/resources/data-sources/index.d.ts.map +1 -0
- package/resources/data-sources/index.js +9 -0
- package/resources/data-sources/index.js.map +1 -0
- package/resources/data-sources/index.mjs +4 -0
- package/resources/data-sources/index.mjs.map +1 -0
- package/resources/data-sources.d.mts +2 -0
- package/resources/data-sources.d.mts.map +1 -0
- package/resources/data-sources.d.ts +2 -0
- package/resources/data-sources.d.ts.map +1 -0
- package/resources/data-sources.js +6 -0
- package/resources/data-sources.js.map +1 -0
- package/resources/data-sources.mjs +3 -0
- package/resources/data-sources.mjs.map +1 -0
- package/resources/embeddings.d.mts +7 -2
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +7 -2
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/extractions/content.d.mts +46 -2
- package/resources/extractions/content.d.mts.map +1 -1
- package/resources/extractions/content.d.ts +46 -2
- package/resources/extractions/content.d.ts.map +1 -1
- package/resources/extractions/extractions.d.mts +2 -2
- package/resources/extractions/extractions.d.mts.map +1 -1
- package/resources/extractions/extractions.d.ts +2 -2
- package/resources/extractions/extractions.d.ts.map +1 -1
- package/resources/extractions/extractions.js +4 -26
- package/resources/extractions/extractions.js.map +1 -1
- package/resources/extractions/extractions.mjs.map +1 -1
- package/resources/extractions/index.d.mts +1 -1
- package/resources/extractions/index.d.mts.map +1 -1
- package/resources/extractions/index.d.ts +1 -1
- package/resources/extractions/index.d.ts.map +1 -1
- package/resources/extractions/index.js.map +1 -1
- package/resources/extractions/index.mjs +1 -1
- package/resources/extractions/index.mjs.map +1 -1
- package/resources/extractions/jobs.d.mts +2 -1
- package/resources/extractions/jobs.d.mts.map +1 -1
- package/resources/extractions/jobs.d.ts +2 -1
- package/resources/extractions/jobs.d.ts.map +1 -1
- package/resources/extractions/jobs.js.map +1 -1
- package/resources/extractions/jobs.mjs.map +1 -1
- package/resources/extractions.js +2 -15
- package/resources/extractions.js.map +1 -1
- package/resources/files.d.mts +18 -2
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +18 -2
- package/resources/files.d.ts.map +1 -1
- package/resources/index.d.mts +6 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -16
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +1 -1
- package/resources/parsing/index.d.mts.map +1 -1
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +29 -11
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +29 -11
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js +2 -24
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +2 -2
- package/resources/parsing/parsing.d.mts.map +1 -1
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js +2 -24
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/parsing.js +2 -15
- package/resources/parsing.js.map +1 -1
- package/resources/top-level.d.mts +9 -4
- package/resources/top-level.d.mts.map +1 -1
- package/resources/top-level.d.ts +9 -4
- package/resources/top-level.d.ts.map +1 -1
- package/resources/vector-stores/files.d.mts +29 -2
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +29 -2
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +2 -24
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/index.d.mts +1 -1
- package/resources/vector-stores/index.d.mts.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +223 -81
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +223 -81
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +2 -24
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/vector-stores.js +2 -15
- package/resources/vector-stores.js.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/client.ts +94 -16
- package/src/internal/headers.ts +4 -3
- package/src/internal/to-file.ts +4 -2
- package/src/internal/uploads.ts +16 -4
- package/src/internal/utils/base64.ts +13 -10
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/uuid.ts +1 -3
- package/src/resources/api-keys.ts +225 -0
- package/src/resources/chat.ts +33 -0
- package/src/resources/data-sources/connectors.ts +280 -0
- package/src/resources/data-sources/data-sources.ts +271 -0
- package/src/resources/data-sources/index.ts +24 -0
- package/src/resources/data-sources.ts +3 -0
- package/src/resources/embeddings.ts +25 -10
- package/src/resources/extractions/content.ts +57 -2
- package/src/resources/extractions/extractions.ts +3 -1
- package/src/resources/extractions/index.ts +7 -1
- package/src/resources/extractions/jobs.ts +2 -1
- package/src/resources/files.ts +21 -0
- package/src/resources/index.ts +27 -4
- package/src/resources/parsing/index.ts +4 -0
- package/src/resources/parsing/jobs.ts +48 -45
- package/src/resources/parsing/parsing.ts +8 -0
- package/src/resources/top-level.ts +10 -40
- package/src/resources/vector-stores/files.ts +39 -2
- package/src/resources/vector-stores/index.ts +4 -3
- package/src/resources/vector-stores/vector-stores.ts +269 -91
- package/src/version.ts +1 -1
- package/uploads.js +2 -15
- package/uploads.js.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/internal/shims/crypto.d.mts +0 -13
- package/internal/shims/crypto.d.mts.map +0 -1
- package/internal/shims/crypto.d.ts +0 -13
- package/internal/shims/crypto.d.ts.map +0 -1
- package/internal/shims/crypto.js +0 -13
- package/internal/shims/crypto.js.map +0 -1
- package/internal/shims/crypto.mjs +0 -9
- package/internal/shims/crypto.mjs.map +0 -1
- package/internal/shims/file.d.mts +0 -23
- package/internal/shims/file.d.mts.map +0 -1
- package/internal/shims/file.d.ts +0 -23
- package/internal/shims/file.d.ts.map +0 -1
- package/internal/shims/file.js +0 -16
- package/internal/shims/file.js.map +0 -1
- package/internal/shims/file.mjs +0 -12
- package/internal/shims/file.mjs.map +0 -1
- package/internal/shims/getBuiltinModule.d.mts +0 -11
- package/internal/shims/getBuiltinModule.d.mts.map +0 -1
- package/internal/shims/getBuiltinModule.d.ts +0 -11
- package/internal/shims/getBuiltinModule.d.ts.map +0 -1
- package/internal/shims/getBuiltinModule.js +0 -68
- package/internal/shims/getBuiltinModule.js.map +0 -1
- package/internal/shims/getBuiltinModule.mjs +0 -64
- package/internal/shims/getBuiltinModule.mjs.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
- package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
- package/internal/shims/nullGetBuiltinModule.js +0 -5
- package/internal/shims/nullGetBuiltinModule.js.map +0 -1
- package/internal/shims/nullGetBuiltinModule.mjs +0 -2
- package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
- package/src/internal/shims/crypto.ts +0 -18
- package/src/internal/shims/file.ts +0 -32
- package/src/internal/shims/getBuiltinModule.ts +0 -64
- package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
@@ -92,7 +92,10 @@ export class VectorStores extends APIResource {
|
|
92
92
|
/**
|
93
93
|
* Question answering
|
94
94
|
*/
|
95
|
-
questionAnswering(
|
95
|
+
questionAnswering(
|
96
|
+
body: VectorStoreQuestionAnsweringParams,
|
97
|
+
options?: RequestOptions,
|
98
|
+
): APIPromise<VectorStoreQuestionAnsweringResponse> {
|
96
99
|
return this._client.post('/v1/vector_stores/question-answering', { body, ...options });
|
97
100
|
}
|
98
101
|
|
@@ -135,56 +138,95 @@ export interface ExpiresAfter {
|
|
135
138
|
days?: number;
|
136
139
|
}
|
137
140
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
141
|
+
export interface ScoredAudioURLInputChunk {
|
142
|
+
/**
|
143
|
+
* position of the chunk in a file
|
144
|
+
*/
|
145
|
+
chunk_index: number;
|
146
|
+
|
147
|
+
/**
|
148
|
+
* mime type of the chunk
|
149
|
+
*/
|
150
|
+
mime_type?: string;
|
151
|
+
|
152
|
+
/**
|
153
|
+
* model used for this chunk
|
154
|
+
*/
|
155
|
+
model?: string | null;
|
156
|
+
|
142
157
|
/**
|
143
|
-
*
|
158
|
+
* score of the chunk
|
144
159
|
*/
|
145
|
-
|
160
|
+
score: number;
|
146
161
|
|
147
162
|
/**
|
148
|
-
*
|
163
|
+
* file id
|
149
164
|
*/
|
150
|
-
|
165
|
+
file_id: string;
|
151
166
|
|
152
167
|
/**
|
153
|
-
*
|
168
|
+
* filename
|
154
169
|
*/
|
155
|
-
|
170
|
+
filename: string;
|
156
171
|
|
157
172
|
/**
|
158
|
-
*
|
173
|
+
* vector store id
|
159
174
|
*/
|
160
|
-
|
175
|
+
vector_store_id: string;
|
176
|
+
|
177
|
+
/**
|
178
|
+
* file metadata
|
179
|
+
*/
|
180
|
+
metadata?: unknown;
|
161
181
|
|
162
182
|
/**
|
163
|
-
*
|
183
|
+
* Input type identifier
|
164
184
|
*/
|
165
|
-
|
185
|
+
type?: 'audio_url';
|
186
|
+
|
187
|
+
/**
|
188
|
+
* The audio input specification.
|
189
|
+
*/
|
190
|
+
audio_url: ScoredAudioURLInputChunk.AudioURL;
|
191
|
+
|
192
|
+
/**
|
193
|
+
* speech recognition (sr) text of the audio
|
194
|
+
*/
|
195
|
+
transcription?: string | null;
|
196
|
+
|
197
|
+
/**
|
198
|
+
* summary of the audio
|
199
|
+
*/
|
200
|
+
summary?: string | null;
|
166
201
|
}
|
167
202
|
|
168
|
-
export
|
203
|
+
export namespace ScoredAudioURLInputChunk {
|
204
|
+
/**
|
205
|
+
* The audio input specification.
|
206
|
+
*/
|
207
|
+
export interface AudioURL {
|
208
|
+
/**
|
209
|
+
* The audio URL. Can be either a URL or a Data URI.
|
210
|
+
*/
|
211
|
+
url: string;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
export interface ScoredImageURLInputChunk {
|
169
216
|
/**
|
170
217
|
* position of the chunk in a file
|
171
218
|
*/
|
172
|
-
|
219
|
+
chunk_index: number;
|
173
220
|
|
174
221
|
/**
|
175
|
-
*
|
222
|
+
* mime type of the chunk
|
176
223
|
*/
|
177
|
-
|
178
|
-
| string
|
179
|
-
| ScoredVectorStoreChunk.ImageURLInput
|
180
|
-
| ScoredVectorStoreChunk.TextInput
|
181
|
-
| Record<string, unknown>
|
182
|
-
| null;
|
224
|
+
mime_type?: string;
|
183
225
|
|
184
226
|
/**
|
185
|
-
*
|
227
|
+
* model used for this chunk
|
186
228
|
*/
|
187
|
-
|
229
|
+
model?: string | null;
|
188
230
|
|
189
231
|
/**
|
190
232
|
* score of the chunk
|
@@ -210,52 +252,163 @@ export interface ScoredVectorStoreChunk {
|
|
210
252
|
* file metadata
|
211
253
|
*/
|
212
254
|
metadata?: unknown;
|
213
|
-
}
|
214
255
|
|
215
|
-
export namespace ScoredVectorStoreChunk {
|
216
256
|
/**
|
217
|
-
*
|
257
|
+
* Input type identifier
|
218
258
|
*/
|
219
|
-
|
220
|
-
/**
|
221
|
-
* Input type identifier
|
222
|
-
*/
|
223
|
-
type?: 'image_url';
|
259
|
+
type?: 'image_url';
|
224
260
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
}
|
261
|
+
/**
|
262
|
+
* The image input specification.
|
263
|
+
*/
|
264
|
+
image_url: ScoredImageURLInputChunk.ImageURL;
|
230
265
|
|
231
|
-
|
266
|
+
/**
|
267
|
+
* ocr text of the image
|
268
|
+
*/
|
269
|
+
ocr_text?: string | null;
|
270
|
+
|
271
|
+
/**
|
272
|
+
* summary of the image
|
273
|
+
*/
|
274
|
+
summary?: string | null;
|
275
|
+
}
|
276
|
+
|
277
|
+
export namespace ScoredImageURLInputChunk {
|
278
|
+
/**
|
279
|
+
* The image input specification.
|
280
|
+
*/
|
281
|
+
export interface ImageURL {
|
232
282
|
/**
|
233
|
-
* The image
|
283
|
+
* The image URL. Can be either a URL or a Data URI.
|
234
284
|
*/
|
235
|
-
|
236
|
-
/**
|
237
|
-
* The image URL. Can be either a URL or a Data URI.
|
238
|
-
*/
|
239
|
-
url: string;
|
240
|
-
}
|
285
|
+
url: string;
|
241
286
|
}
|
287
|
+
}
|
242
288
|
|
289
|
+
export interface ScoredTextInputChunk {
|
243
290
|
/**
|
244
|
-
*
|
245
|
-
*
|
246
|
-
* Attributes: type: Input type identifier, always "text" text: The actual text
|
247
|
-
* content, with length and whitespace constraints
|
291
|
+
* position of the chunk in a file
|
248
292
|
*/
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
293
|
+
chunk_index: number;
|
294
|
+
|
295
|
+
/**
|
296
|
+
* mime type of the chunk
|
297
|
+
*/
|
298
|
+
mime_type?: string;
|
299
|
+
|
300
|
+
/**
|
301
|
+
* model used for this chunk
|
302
|
+
*/
|
303
|
+
model?: string | null;
|
304
|
+
|
305
|
+
/**
|
306
|
+
* score of the chunk
|
307
|
+
*/
|
308
|
+
score: number;
|
254
309
|
|
310
|
+
/**
|
311
|
+
* file id
|
312
|
+
*/
|
313
|
+
file_id: string;
|
314
|
+
|
315
|
+
/**
|
316
|
+
* filename
|
317
|
+
*/
|
318
|
+
filename: string;
|
319
|
+
|
320
|
+
/**
|
321
|
+
* vector store id
|
322
|
+
*/
|
323
|
+
vector_store_id: string;
|
324
|
+
|
325
|
+
/**
|
326
|
+
* file metadata
|
327
|
+
*/
|
328
|
+
metadata?: unknown;
|
329
|
+
|
330
|
+
/**
|
331
|
+
* Input type identifier
|
332
|
+
*/
|
333
|
+
type?: 'text';
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Text content to process
|
337
|
+
*/
|
338
|
+
text: string;
|
339
|
+
}
|
340
|
+
|
341
|
+
export interface ScoredVideoURLInputChunk {
|
342
|
+
/**
|
343
|
+
* position of the chunk in a file
|
344
|
+
*/
|
345
|
+
chunk_index: number;
|
346
|
+
|
347
|
+
/**
|
348
|
+
* mime type of the chunk
|
349
|
+
*/
|
350
|
+
mime_type?: string;
|
351
|
+
|
352
|
+
/**
|
353
|
+
* model used for this chunk
|
354
|
+
*/
|
355
|
+
model?: string | null;
|
356
|
+
|
357
|
+
/**
|
358
|
+
* score of the chunk
|
359
|
+
*/
|
360
|
+
score: number;
|
361
|
+
|
362
|
+
/**
|
363
|
+
* file id
|
364
|
+
*/
|
365
|
+
file_id: string;
|
366
|
+
|
367
|
+
/**
|
368
|
+
* filename
|
369
|
+
*/
|
370
|
+
filename: string;
|
371
|
+
|
372
|
+
/**
|
373
|
+
* vector store id
|
374
|
+
*/
|
375
|
+
vector_store_id: string;
|
376
|
+
|
377
|
+
/**
|
378
|
+
* file metadata
|
379
|
+
*/
|
380
|
+
metadata?: unknown;
|
381
|
+
|
382
|
+
/**
|
383
|
+
* Input type identifier
|
384
|
+
*/
|
385
|
+
type?: 'video_url';
|
386
|
+
|
387
|
+
/**
|
388
|
+
* The video input specification.
|
389
|
+
*/
|
390
|
+
video_url: ScoredVideoURLInputChunk.VideoURL;
|
391
|
+
|
392
|
+
/**
|
393
|
+
* speech recognition (sr) text of the video
|
394
|
+
*/
|
395
|
+
transcription?: string | null;
|
396
|
+
|
397
|
+
/**
|
398
|
+
* summary of the video
|
399
|
+
*/
|
400
|
+
summary?: string | null;
|
401
|
+
}
|
402
|
+
|
403
|
+
export namespace ScoredVideoURLInputChunk {
|
404
|
+
/**
|
405
|
+
* The video input specification.
|
406
|
+
*/
|
407
|
+
export interface VideoURL {
|
255
408
|
/**
|
256
|
-
*
|
409
|
+
* The video URL. Can be either a URL or a Data URI.
|
257
410
|
*/
|
258
|
-
|
411
|
+
url: string;
|
259
412
|
}
|
260
413
|
}
|
261
414
|
|
@@ -286,7 +439,7 @@ export interface VectorStore {
|
|
286
439
|
/**
|
287
440
|
* Counts of files in different states
|
288
441
|
*/
|
289
|
-
file_counts?: FileCounts;
|
442
|
+
file_counts?: VectorStore.FileCounts;
|
290
443
|
|
291
444
|
/**
|
292
445
|
* Represents an expiration policy for a vector store.
|
@@ -329,30 +482,42 @@ export interface VectorStore {
|
|
329
482
|
object?: 'vector_store';
|
330
483
|
}
|
331
484
|
|
332
|
-
|
333
|
-
* Options for configuring vector store chunk searches.
|
334
|
-
*/
|
335
|
-
export interface VectorStoreChunkSearchOptions {
|
485
|
+
export namespace VectorStore {
|
336
486
|
/**
|
337
|
-
*
|
487
|
+
* Counts of files in different states
|
338
488
|
*/
|
339
|
-
|
489
|
+
export interface FileCounts {
|
490
|
+
/**
|
491
|
+
* Number of files currently being processed
|
492
|
+
*/
|
493
|
+
in_progress?: number;
|
340
494
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
495
|
+
/**
|
496
|
+
* Number of files whose processing was cancelled
|
497
|
+
*/
|
498
|
+
cancelled?: number;
|
345
499
|
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
500
|
+
/**
|
501
|
+
* Number of successfully processed files
|
502
|
+
*/
|
503
|
+
completed?: number;
|
504
|
+
|
505
|
+
/**
|
506
|
+
* Number of files that failed processing
|
507
|
+
*/
|
508
|
+
failed?: number;
|
509
|
+
|
510
|
+
/**
|
511
|
+
* Total number of files
|
512
|
+
*/
|
513
|
+
total?: number;
|
514
|
+
}
|
350
515
|
}
|
351
516
|
|
352
517
|
/**
|
353
|
-
* Options for configuring vector store
|
518
|
+
* Options for configuring vector store chunk searches.
|
354
519
|
*/
|
355
|
-
export interface
|
520
|
+
export interface VectorStoreChunkSearchOptions {
|
356
521
|
/**
|
357
522
|
* Minimum similarity score threshold
|
358
523
|
*/
|
@@ -367,16 +532,6 @@ export interface VectorStoreFileSearchOptions {
|
|
367
532
|
* Whether to return file metadata
|
368
533
|
*/
|
369
534
|
return_metadata?: boolean;
|
370
|
-
|
371
|
-
/**
|
372
|
-
* Whether to return matching text chunks
|
373
|
-
*/
|
374
|
-
return_chunks?: boolean;
|
375
|
-
|
376
|
-
/**
|
377
|
-
* Number of chunks to return for each file
|
378
|
-
*/
|
379
|
-
chunks_per_file?: number;
|
380
535
|
}
|
381
536
|
|
382
537
|
/**
|
@@ -399,7 +554,22 @@ export interface VectorStoreDeleteResponse {
|
|
399
554
|
object?: 'vector_store';
|
400
555
|
}
|
401
556
|
|
402
|
-
|
557
|
+
/**
|
558
|
+
* Results from a question answering operation.
|
559
|
+
*/
|
560
|
+
export interface VectorStoreQuestionAnsweringResponse {
|
561
|
+
/**
|
562
|
+
* The answer generated by the LLM
|
563
|
+
*/
|
564
|
+
answer: string;
|
565
|
+
|
566
|
+
/**
|
567
|
+
* Source documents used to generate the answer
|
568
|
+
*/
|
569
|
+
sources?: Array<
|
570
|
+
ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
|
571
|
+
>;
|
572
|
+
}
|
403
573
|
|
404
574
|
export interface VectorStoreSearchResponse {
|
405
575
|
/**
|
@@ -410,7 +580,9 @@ export interface VectorStoreSearchResponse {
|
|
410
580
|
/**
|
411
581
|
* The list of scored vector store file chunks
|
412
582
|
*/
|
413
|
-
data: Array<
|
583
|
+
data: Array<
|
584
|
+
ScoredTextInputChunk | ScoredImageURLInputChunk | ScoredAudioURLInputChunk | ScoredVideoURLInputChunk
|
585
|
+
>;
|
414
586
|
}
|
415
587
|
|
416
588
|
export interface VectorStoreCreateParams {
|
@@ -493,7 +665,7 @@ export interface VectorStoreQuestionAnsweringParams {
|
|
493
665
|
/**
|
494
666
|
* Search configuration options
|
495
667
|
*/
|
496
|
-
search_options?:
|
668
|
+
search_options?: VectorStoreChunkSearchOptions;
|
497
669
|
|
498
670
|
/**
|
499
671
|
* Whether to stream the answer
|
@@ -515,6 +687,11 @@ export namespace VectorStoreQuestionAnsweringParams {
|
|
515
687
|
* Whether to use citations
|
516
688
|
*/
|
517
689
|
cite?: boolean;
|
690
|
+
|
691
|
+
/**
|
692
|
+
* Whether to use multimodal context
|
693
|
+
*/
|
694
|
+
multimodal?: boolean;
|
518
695
|
}
|
519
696
|
}
|
520
697
|
|
@@ -554,11 +731,12 @@ VectorStores.Files = Files;
|
|
554
731
|
export declare namespace VectorStores {
|
555
732
|
export {
|
556
733
|
type ExpiresAfter as ExpiresAfter,
|
557
|
-
type
|
558
|
-
type
|
734
|
+
type ScoredAudioURLInputChunk as ScoredAudioURLInputChunk,
|
735
|
+
type ScoredImageURLInputChunk as ScoredImageURLInputChunk,
|
736
|
+
type ScoredTextInputChunk as ScoredTextInputChunk,
|
737
|
+
type ScoredVideoURLInputChunk as ScoredVideoURLInputChunk,
|
559
738
|
type VectorStore as VectorStore,
|
560
739
|
type VectorStoreChunkSearchOptions as VectorStoreChunkSearchOptions,
|
561
|
-
type VectorStoreFileSearchOptions as VectorStoreFileSearchOptions,
|
562
740
|
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
|
563
741
|
type VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
|
564
742
|
type VectorStoreSearchResponse as VectorStoreSearchResponse,
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
package/uploads.js
CHANGED
@@ -1,19 +1,6 @@
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const tslib_1 = require("./internal/tslib.js");
|
17
4
|
/** @deprecated Import from ./core/uploads instead */
|
18
|
-
__exportStar(require("./core/uploads.js"), exports);
|
5
|
+
tslib_1.__exportStar(require("./core/uploads.js"), exports);
|
19
6
|
//# sourceMappingURL=uploads.js.map
|
package/uploads.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA+B"}
|
package/version.d.mts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.6.0";
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const VERSION = "0.
|
1
|
+
export declare const VERSION = "0.6.0";
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export const VERSION = '0.
|
1
|
+
export const VERSION = '0.6.0'; // x-release-please-version
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
@@ -1,13 +0,0 @@
|
|
1
|
-
type Crypto = {
|
2
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
3
|
-
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
4
|
-
/**
|
5
|
-
* Available only in secure contexts.
|
6
|
-
*
|
7
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
8
|
-
*/
|
9
|
-
randomUUID?: () => string;
|
10
|
-
};
|
11
|
-
export declare let getCrypto: () => Crypto | undefined;
|
12
|
-
export {};
|
13
|
-
//# sourceMappingURL=crypto.d.mts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"crypto.d.mts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
type Crypto = {
|
2
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
3
|
-
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
4
|
-
/**
|
5
|
-
* Available only in secure contexts.
|
6
|
-
*
|
7
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
|
8
|
-
*/
|
9
|
-
randomUUID?: () => string;
|
10
|
-
};
|
11
|
-
export declare let getCrypto: () => Crypto | undefined;
|
12
|
-
export {};
|
13
|
-
//# sourceMappingURL=crypto.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
package/internal/shims/crypto.js
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getCrypto = void 0;
|
4
|
-
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
5
|
-
let getCrypto = function lazyGetCrypto() {
|
6
|
-
if (exports.getCrypto !== lazyGetCrypto)
|
7
|
-
return (0, exports.getCrypto)();
|
8
|
-
const crypto = globalThis.crypto || (0, getBuiltinModule_1.getBuiltinModule)?.('node:crypto')?.webcrypto;
|
9
|
-
exports.getCrypto = () => crypto;
|
10
|
-
return crypto;
|
11
|
-
};
|
12
|
-
exports.getCrypto = getCrypto;
|
13
|
-
//# sourceMappingURL=crypto.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAY/C,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,iBAAS,KAAK,aAAa;QAAE,OAAO,IAAA,iBAAS,GAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,iBAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALS,QAAA,SAAS,aAKlB"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
2
|
-
export let getCrypto = function lazyGetCrypto() {
|
3
|
-
if (getCrypto !== lazyGetCrypto)
|
4
|
-
return getCrypto();
|
5
|
-
const crypto = globalThis.crypto || getBuiltinModule?.('node:crypto')?.webcrypto;
|
6
|
-
getCrypto = () => crypto;
|
7
|
-
return crypto;
|
8
|
-
};
|
9
|
-
//# sourceMappingURL=crypto.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"crypto.mjs","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAY3B,MAAM,CAAC,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,SAAS,KAAK,aAAa;QAAE,OAAO,SAAS,EAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
export declare let getFile: () => FileConstructor;
|
3
|
-
type FileConstructor = typeof globalThis extends {
|
4
|
-
File: infer fileConstructor;
|
5
|
-
} ? fileConstructor : typeof FallbackFile;
|
6
|
-
export type File = InstanceType<FileConstructor>;
|
7
|
-
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
8
|
-
/**
|
9
|
-
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
10
|
-
*/
|
11
|
-
declare class FallbackFile extends Blob {
|
12
|
-
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
13
|
-
/**
|
14
|
-
* The name of the `File`.
|
15
|
-
*/
|
16
|
-
readonly name: string;
|
17
|
-
/**
|
18
|
-
* The last modified date of the `File`.
|
19
|
-
*/
|
20
|
-
readonly lastModified: number;
|
21
|
-
}
|
22
|
-
export {};
|
23
|
-
//# sourceMappingURL=file.d.mts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.d.mts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
package/internal/shims/file.d.ts
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
|
2
|
-
export declare let getFile: () => FileConstructor;
|
3
|
-
type FileConstructor = typeof globalThis extends {
|
4
|
-
File: infer fileConstructor;
|
5
|
-
} ? fileConstructor : typeof FallbackFile;
|
6
|
-
export type File = InstanceType<FileConstructor>;
|
7
|
-
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
8
|
-
/**
|
9
|
-
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
10
|
-
*/
|
11
|
-
declare class FallbackFile extends Blob {
|
12
|
-
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
13
|
-
/**
|
14
|
-
* The name of the `File`.
|
15
|
-
*/
|
16
|
-
readonly name: string;
|
17
|
-
/**
|
18
|
-
* The last modified date of the `File`.
|
19
|
-
*/
|
20
|
-
readonly lastModified: number;
|
21
|
-
}
|
22
|
-
export {};
|
23
|
-
//# sourceMappingURL=file.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
package/internal/shims/file.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.getFile = void 0;
|
4
|
-
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
5
|
-
let getFile = function lazyGetFile() {
|
6
|
-
if (exports.getFile !== lazyGetFile)
|
7
|
-
return (0, exports.getFile)();
|
8
|
-
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
9
|
-
const File = globalThis.File ?? (0, getBuiltinModule_1.getBuiltinModule)?.('node:buffer')?.File;
|
10
|
-
if (!File)
|
11
|
-
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
12
|
-
exports.getFile = () => File;
|
13
|
-
return File;
|
14
|
-
};
|
15
|
-
exports.getFile = getFile;
|
16
|
-
//# sourceMappingURL=file.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAE/C,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,eAAO,KAAK,WAAW;QAAE,OAAO,IAAA,eAAO,GAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,eAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPS,QAAA,OAAO,WAOhB"}
|