@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.cjs
CHANGED
|
@@ -1815,13 +1815,20 @@ var StorageBucket = class {
|
|
|
1815
1815
|
/**
|
|
1816
1816
|
* Upload a file to the bucket
|
|
1817
1817
|
* @param path - The path/key for the file
|
|
1818
|
-
* @param file - The file to upload (File, Blob, or
|
|
1818
|
+
* @param file - The file to upload (File, Blob, ArrayBuffer, or ArrayBufferView like Uint8Array)
|
|
1819
1819
|
* @param options - Upload options
|
|
1820
1820
|
*/
|
|
1821
1821
|
async upload(path, file, options) {
|
|
1822
1822
|
try {
|
|
1823
1823
|
const formData = new FormData();
|
|
1824
|
-
|
|
1824
|
+
let blob;
|
|
1825
|
+
if (file instanceof ArrayBuffer) {
|
|
1826
|
+
blob = new Blob([file], { type: options?.contentType });
|
|
1827
|
+
} else if (ArrayBuffer.isView(file)) {
|
|
1828
|
+
blob = new Blob([file], { type: options?.contentType });
|
|
1829
|
+
} else {
|
|
1830
|
+
blob = file;
|
|
1831
|
+
}
|
|
1825
1832
|
formData.append("file", blob);
|
|
1826
1833
|
if (options?.contentType) {
|
|
1827
1834
|
formData.append("content_type", options.contentType);
|
|
@@ -2640,6 +2647,7 @@ var FluxbaseJobs = class {
|
|
|
2640
2647
|
if (filters?.namespace) params.append("namespace", filters.namespace);
|
|
2641
2648
|
if (filters?.limit) params.append("limit", filters.limit.toString());
|
|
2642
2649
|
if (filters?.offset) params.append("offset", filters.offset.toString());
|
|
2650
|
+
if (filters?.includeResult) params.append("include_result", "true");
|
|
2643
2651
|
const queryString = params.toString();
|
|
2644
2652
|
const data = await this.fetch.get(
|
|
2645
2653
|
`/api/v1/jobs${queryString ? `?${queryString}` : ""}`
|
|
@@ -5396,6 +5404,7 @@ var FluxbaseAdminJobs = class _FluxbaseAdminJobs {
|
|
|
5396
5404
|
if (filters?.namespace) params.append("namespace", filters.namespace);
|
|
5397
5405
|
if (filters?.limit) params.append("limit", filters.limit.toString());
|
|
5398
5406
|
if (filters?.offset) params.append("offset", filters.offset.toString());
|
|
5407
|
+
if (filters?.includeResult) params.append("include_result", "true");
|
|
5399
5408
|
const queryString = params.toString();
|
|
5400
5409
|
const data = await this.fetch.get(
|
|
5401
5410
|
`/api/v1/admin/jobs/queue${queryString ? `?${queryString}` : ""}`
|