@mixedbread/sdk 0.55.0 → 0.57.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 +35 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -3
- package/client.js.map +1 -1
- package/client.mjs +3 -3
- package/client.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/lib/upload-file.d.mts +34 -0
- package/lib/upload-file.d.mts.map +1 -0
- package/lib/upload-file.d.ts +34 -0
- package/lib/upload-file.d.ts.map +1 -0
- package/lib/upload-file.js +146 -0
- package/lib/upload-file.js.map +1 -0
- package/lib/upload-file.mjs +141 -0
- package/lib/upload-file.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/files/files.d.mts +156 -0
- package/resources/files/files.d.mts.map +1 -0
- package/resources/files/files.d.ts +156 -0
- package/resources/files/files.d.ts.map +1 -0
- package/resources/files/files.js +86 -0
- package/resources/files/files.js.map +1 -0
- package/resources/files/files.mjs +81 -0
- package/resources/files/files.mjs.map +1 -0
- package/resources/files/index.d.mts +3 -0
- package/resources/files/index.d.mts.map +1 -0
- package/resources/files/index.d.ts +3 -0
- package/resources/files/index.d.ts.map +1 -0
- package/resources/files/index.js +9 -0
- package/resources/files/index.js.map +1 -0
- package/resources/files/index.mjs +4 -0
- package/resources/files/index.mjs.map +1 -0
- package/resources/files/uploads.d.mts +169 -0
- package/resources/files/uploads.d.mts.map +1 -0
- package/resources/files/uploads.d.ts +169 -0
- package/resources/files/uploads.d.ts.map +1 -0
- package/resources/files/uploads.js +43 -0
- package/resources/files/uploads.js.map +1 -0
- package/resources/files/uploads.mjs +39 -0
- package/resources/files/uploads.mjs.map +1 -0
- package/resources/files.d.mts +1 -144
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +1 -144
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +2 -73
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +1 -71
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/stores/files.d.mts +10 -7
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +10 -7
- package/resources/stores/files.d.ts.map +1 -1
- package/resources/stores/files.js +15 -4
- package/resources/stores/files.js.map +1 -1
- package/resources/stores/files.mjs +15 -4
- package/resources/stores/files.mjs.map +1 -1
- package/resources/stores/stores.d.mts +4 -4
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +4 -4
- package/resources/stores/stores.d.ts.map +1 -1
- package/src/client.ts +15 -15
- package/src/index.ts +1 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/lib/upload-file.ts +233 -0
- package/src/resources/files/files.ts +239 -0
- package/src/resources/files/index.ts +23 -0
- package/src/resources/files/uploads.ts +229 -0
- package/src/resources/files.ts +1 -201
- package/src/resources/index.ts +1 -1
- package/src/resources/stores/files.ts +28 -7
- package/src/resources/stores/stores.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -7,6 +7,7 @@ import * as StoresAPI from './stores';
|
|
|
7
7
|
import { APIPromise } from '../../core/api-promise';
|
|
8
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
9
|
import * as polling from '../../lib/polling';
|
|
10
|
+
import { type MultipartUploadConfig } from '../../lib/upload-file';
|
|
10
11
|
import { Uploadable } from '../../uploads';
|
|
11
12
|
import { path } from '../../internal/utils/path';
|
|
12
13
|
|
|
@@ -230,6 +231,7 @@ export class Files extends APIResource {
|
|
|
230
231
|
file: Uploadable,
|
|
231
232
|
body?: Omit<FileCreateParams, 'file_id'>,
|
|
232
233
|
options?: RequestOptions,
|
|
234
|
+
multipartUpload?: MultipartUploadConfig,
|
|
233
235
|
): Promise<StoreFile>;
|
|
234
236
|
async upload(params: FileUploadHelperParams): Promise<StoreFile>;
|
|
235
237
|
async upload(
|
|
@@ -237,13 +239,26 @@ export class Files extends APIResource {
|
|
|
237
239
|
file?: Uploadable,
|
|
238
240
|
body?: Omit<FileCreateParams, 'file_id'>,
|
|
239
241
|
options?: RequestOptions,
|
|
242
|
+
multipartUpload?: MultipartUploadConfig,
|
|
240
243
|
): Promise<StoreFile> {
|
|
241
244
|
const params: FileUploadHelperParams =
|
|
242
245
|
typeof storeIdentifierOrParams === 'string' ?
|
|
243
|
-
{
|
|
246
|
+
{
|
|
247
|
+
storeIdentifier: storeIdentifierOrParams,
|
|
248
|
+
file: file as Uploadable,
|
|
249
|
+
body,
|
|
250
|
+
options,
|
|
251
|
+
multipartUpload,
|
|
252
|
+
}
|
|
244
253
|
: storeIdentifierOrParams;
|
|
245
254
|
|
|
246
|
-
const fileUploadResponse = await this._client.files.create(
|
|
255
|
+
const fileUploadResponse = await this._client.files.create(
|
|
256
|
+
{
|
|
257
|
+
file: params.file,
|
|
258
|
+
...(params.multipartUpload && { multipartUpload: params.multipartUpload }),
|
|
259
|
+
},
|
|
260
|
+
params.options,
|
|
261
|
+
);
|
|
247
262
|
|
|
248
263
|
return this.create(
|
|
249
264
|
params.storeIdentifier,
|
|
@@ -274,6 +289,7 @@ export class Files extends APIResource {
|
|
|
274
289
|
pollIntervalMs?: number,
|
|
275
290
|
pollTimeoutMs?: number,
|
|
276
291
|
options?: RequestOptions,
|
|
292
|
+
multipartUpload?: MultipartUploadConfig,
|
|
277
293
|
): Promise<StoreFile>;
|
|
278
294
|
async uploadAndPoll(params: FileUploadAndPollHelperParams): Promise<StoreFile>;
|
|
279
295
|
async uploadAndPoll(
|
|
@@ -283,6 +299,7 @@ export class Files extends APIResource {
|
|
|
283
299
|
pollIntervalMs?: number,
|
|
284
300
|
pollTimeoutMs?: number,
|
|
285
301
|
options?: RequestOptions,
|
|
302
|
+
multipartUpload?: MultipartUploadConfig,
|
|
286
303
|
): Promise<StoreFile> {
|
|
287
304
|
const params: FileUploadAndPollHelperParams =
|
|
288
305
|
typeof storeIdentifierOrParams === 'string' ?
|
|
@@ -293,6 +310,7 @@ export class Files extends APIResource {
|
|
|
293
310
|
pollIntervalMs,
|
|
294
311
|
pollTimeoutMs,
|
|
295
312
|
options,
|
|
313
|
+
multipartUpload,
|
|
296
314
|
}
|
|
297
315
|
: storeIdentifierOrParams;
|
|
298
316
|
|
|
@@ -301,6 +319,7 @@ export class Files extends APIResource {
|
|
|
301
319
|
file: params.file,
|
|
302
320
|
body: params.body,
|
|
303
321
|
options: params.options,
|
|
322
|
+
multipartUpload: params.multipartUpload,
|
|
304
323
|
});
|
|
305
324
|
|
|
306
325
|
return this.poll({
|
|
@@ -346,6 +365,7 @@ export interface FileUploadHelperParams {
|
|
|
346
365
|
file: Uploadable;
|
|
347
366
|
body?: Omit<FileCreateParams, 'file_id'> | undefined;
|
|
348
367
|
options?: RequestOptions | undefined;
|
|
368
|
+
multipartUpload?: MultipartUploadConfig | undefined;
|
|
349
369
|
}
|
|
350
370
|
|
|
351
371
|
/**
|
|
@@ -359,6 +379,7 @@ export interface FileUploadAndPollHelperParams {
|
|
|
359
379
|
pollTimeoutMs?: number | undefined;
|
|
360
380
|
options?: RequestOptions | undefined;
|
|
361
381
|
returnChunks?: boolean | undefined;
|
|
382
|
+
multipartUpload?: MultipartUploadConfig | undefined;
|
|
362
383
|
}
|
|
363
384
|
|
|
364
385
|
/**
|
|
@@ -716,7 +737,7 @@ export namespace StoreFile {
|
|
|
716
737
|
|
|
717
738
|
file_type: string;
|
|
718
739
|
|
|
719
|
-
file_size
|
|
740
|
+
file_size?: number | null;
|
|
720
741
|
|
|
721
742
|
total_duration_seconds: number;
|
|
722
743
|
|
|
@@ -922,7 +943,7 @@ export namespace StoreFile {
|
|
|
922
943
|
|
|
923
944
|
file_type: string;
|
|
924
945
|
|
|
925
|
-
file_size
|
|
946
|
+
file_size?: number | null;
|
|
926
947
|
|
|
927
948
|
total_duration_seconds: number;
|
|
928
949
|
|
|
@@ -1148,7 +1169,7 @@ export namespace StoreFile {
|
|
|
1148
1169
|
|
|
1149
1170
|
file_type: string;
|
|
1150
1171
|
|
|
1151
|
-
file_size
|
|
1172
|
+
file_size?: number | null;
|
|
1152
1173
|
|
|
1153
1174
|
total_duration_seconds: number;
|
|
1154
1175
|
|
|
@@ -1364,7 +1385,7 @@ export namespace StoreFile {
|
|
|
1364
1385
|
|
|
1365
1386
|
file_type: string;
|
|
1366
1387
|
|
|
1367
|
-
file_size
|
|
1388
|
+
file_size?: number | null;
|
|
1368
1389
|
|
|
1369
1390
|
total_duration_seconds: number;
|
|
1370
1391
|
|
|
@@ -1609,7 +1630,7 @@ export interface FileListParams {
|
|
|
1609
1630
|
| null;
|
|
1610
1631
|
|
|
1611
1632
|
/**
|
|
1612
|
-
* Search query for fuzzy matching over name and
|
|
1633
|
+
* Search query for fuzzy matching over name and external_id fields
|
|
1613
1634
|
*/
|
|
1614
1635
|
q?: string | null;
|
|
1615
1636
|
}
|
|
@@ -358,7 +358,7 @@ export namespace ScoredAudioURLInputChunk {
|
|
|
358
358
|
|
|
359
359
|
file_type: string;
|
|
360
360
|
|
|
361
|
-
file_size
|
|
361
|
+
file_size?: number | null;
|
|
362
362
|
|
|
363
363
|
total_duration_seconds: number;
|
|
364
364
|
|
|
@@ -604,7 +604,7 @@ export namespace ScoredImageURLInputChunk {
|
|
|
604
604
|
|
|
605
605
|
file_type: string;
|
|
606
606
|
|
|
607
|
-
file_size
|
|
607
|
+
file_size?: number | null;
|
|
608
608
|
|
|
609
609
|
total_duration_seconds: number;
|
|
610
610
|
|
|
@@ -850,7 +850,7 @@ export namespace ScoredTextInputChunk {
|
|
|
850
850
|
|
|
851
851
|
file_type: string;
|
|
852
852
|
|
|
853
|
-
file_size
|
|
853
|
+
file_size?: number | null;
|
|
854
854
|
|
|
855
855
|
total_duration_seconds: number;
|
|
856
856
|
|
|
@@ -1086,7 +1086,7 @@ export namespace ScoredVideoURLInputChunk {
|
|
|
1086
1086
|
|
|
1087
1087
|
file_type: string;
|
|
1088
1088
|
|
|
1089
|
-
file_size
|
|
1089
|
+
file_size?: number | null;
|
|
1090
1090
|
|
|
1091
1091
|
total_duration_seconds: number;
|
|
1092
1092
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.57.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.57.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.57.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.57.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|