@fluxbase/sdk 0.0.1-rc.44 → 0.0.1-rc.45
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/dist/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2538,10 +2538,10 @@ declare class StorageBucket {
|
|
|
2538
2538
|
/**
|
|
2539
2539
|
* Upload a file to the bucket
|
|
2540
2540
|
* @param path - The path/key for the file
|
|
2541
|
-
* @param file - The file to upload (File, Blob, or
|
|
2541
|
+
* @param file - The file to upload (File, Blob, ArrayBuffer, or ArrayBufferView like Uint8Array)
|
|
2542
2542
|
* @param options - Upload options
|
|
2543
2543
|
*/
|
|
2544
|
-
upload(path: string, file: File | Blob | ArrayBuffer, options?: UploadOptions): Promise<{
|
|
2544
|
+
upload(path: string, file: File | Blob | ArrayBuffer | ArrayBufferView, options?: UploadOptions): Promise<{
|
|
2545
2545
|
data: {
|
|
2546
2546
|
id: string;
|
|
2547
2547
|
path: string;
|
|
@@ -3004,6 +3004,7 @@ declare class FluxbaseJobs {
|
|
|
3004
3004
|
namespace?: string;
|
|
3005
3005
|
limit?: number;
|
|
3006
3006
|
offset?: number;
|
|
3007
|
+
includeResult?: boolean;
|
|
3007
3008
|
}): Promise<{
|
|
3008
3009
|
data: Job[] | null;
|
|
3009
3010
|
error: Error | null;
|
|
@@ -5533,6 +5534,7 @@ declare class FluxbaseAdminJobs {
|
|
|
5533
5534
|
namespace?: string;
|
|
5534
5535
|
limit?: number;
|
|
5535
5536
|
offset?: number;
|
|
5537
|
+
includeResult?: boolean;
|
|
5536
5538
|
}): Promise<{
|
|
5537
5539
|
data: Job[] | null;
|
|
5538
5540
|
error: Error | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -2538,10 +2538,10 @@ declare class StorageBucket {
|
|
|
2538
2538
|
/**
|
|
2539
2539
|
* Upload a file to the bucket
|
|
2540
2540
|
* @param path - The path/key for the file
|
|
2541
|
-
* @param file - The file to upload (File, Blob, or
|
|
2541
|
+
* @param file - The file to upload (File, Blob, ArrayBuffer, or ArrayBufferView like Uint8Array)
|
|
2542
2542
|
* @param options - Upload options
|
|
2543
2543
|
*/
|
|
2544
|
-
upload(path: string, file: File | Blob | ArrayBuffer, options?: UploadOptions): Promise<{
|
|
2544
|
+
upload(path: string, file: File | Blob | ArrayBuffer | ArrayBufferView, options?: UploadOptions): Promise<{
|
|
2545
2545
|
data: {
|
|
2546
2546
|
id: string;
|
|
2547
2547
|
path: string;
|
|
@@ -3004,6 +3004,7 @@ declare class FluxbaseJobs {
|
|
|
3004
3004
|
namespace?: string;
|
|
3005
3005
|
limit?: number;
|
|
3006
3006
|
offset?: number;
|
|
3007
|
+
includeResult?: boolean;
|
|
3007
3008
|
}): Promise<{
|
|
3008
3009
|
data: Job[] | null;
|
|
3009
3010
|
error: Error | null;
|
|
@@ -5533,6 +5534,7 @@ declare class FluxbaseAdminJobs {
|
|
|
5533
5534
|
namespace?: string;
|
|
5534
5535
|
limit?: number;
|
|
5535
5536
|
offset?: number;
|
|
5537
|
+
includeResult?: boolean;
|
|
5536
5538
|
}): Promise<{
|
|
5537
5539
|
data: Job[] | null;
|
|
5538
5540
|
error: Error | null;
|
package/dist/index.js
CHANGED
|
@@ -1813,13 +1813,20 @@ var StorageBucket = class {
|
|
|
1813
1813
|
/**
|
|
1814
1814
|
* Upload a file to the bucket
|
|
1815
1815
|
* @param path - The path/key for the file
|
|
1816
|
-
* @param file - The file to upload (File, Blob, or
|
|
1816
|
+
* @param file - The file to upload (File, Blob, ArrayBuffer, or ArrayBufferView like Uint8Array)
|
|
1817
1817
|
* @param options - Upload options
|
|
1818
1818
|
*/
|
|
1819
1819
|
async upload(path, file, options) {
|
|
1820
1820
|
try {
|
|
1821
1821
|
const formData = new FormData();
|
|
1822
|
-
|
|
1822
|
+
let blob;
|
|
1823
|
+
if (file instanceof ArrayBuffer) {
|
|
1824
|
+
blob = new Blob([file], { type: options?.contentType });
|
|
1825
|
+
} else if (ArrayBuffer.isView(file)) {
|
|
1826
|
+
blob = new Blob([file], { type: options?.contentType });
|
|
1827
|
+
} else {
|
|
1828
|
+
blob = file;
|
|
1829
|
+
}
|
|
1823
1830
|
formData.append("file", blob);
|
|
1824
1831
|
if (options?.contentType) {
|
|
1825
1832
|
formData.append("content_type", options.contentType);
|
|
@@ -2638,6 +2645,7 @@ var FluxbaseJobs = class {
|
|
|
2638
2645
|
if (filters?.namespace) params.append("namespace", filters.namespace);
|
|
2639
2646
|
if (filters?.limit) params.append("limit", filters.limit.toString());
|
|
2640
2647
|
if (filters?.offset) params.append("offset", filters.offset.toString());
|
|
2648
|
+
if (filters?.includeResult) params.append("include_result", "true");
|
|
2641
2649
|
const queryString = params.toString();
|
|
2642
2650
|
const data = await this.fetch.get(
|
|
2643
2651
|
`/api/v1/jobs${queryString ? `?${queryString}` : ""}`
|
|
@@ -5394,6 +5402,7 @@ var FluxbaseAdminJobs = class _FluxbaseAdminJobs {
|
|
|
5394
5402
|
if (filters?.namespace) params.append("namespace", filters.namespace);
|
|
5395
5403
|
if (filters?.limit) params.append("limit", filters.limit.toString());
|
|
5396
5404
|
if (filters?.offset) params.append("offset", filters.offset.toString());
|
|
5405
|
+
if (filters?.includeResult) params.append("include_result", "true");
|
|
5397
5406
|
const queryString = params.toString();
|
|
5398
5407
|
const data = await this.fetch.get(
|
|
5399
5408
|
`/api/v1/admin/jobs/queue${queryString ? `?${queryString}` : ""}`
|