@fluxbase/sdk 0.0.1-rc.44 → 0.0.1-rc.46
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 +29 -28
- package/dist/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -9
- package/dist/index.d.ts +7 -9
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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;
|
|
@@ -2557,7 +2557,6 @@ declare class StorageBucket {
|
|
|
2557
2557
|
/**
|
|
2558
2558
|
* Download a file from the bucket
|
|
2559
2559
|
* @param path - The path/key of the file
|
|
2560
|
-
* @param options - Download options (use { stream: true } for streaming)
|
|
2561
2560
|
*
|
|
2562
2561
|
* @example
|
|
2563
2562
|
* ```typescript
|
|
@@ -3004,6 +3003,7 @@ declare class FluxbaseJobs {
|
|
|
3004
3003
|
namespace?: string;
|
|
3005
3004
|
limit?: number;
|
|
3006
3005
|
offset?: number;
|
|
3006
|
+
includeResult?: boolean;
|
|
3007
3007
|
}): Promise<{
|
|
3008
3008
|
data: Job[] | null;
|
|
3009
3009
|
error: Error | null;
|
|
@@ -5533,6 +5533,7 @@ declare class FluxbaseAdminJobs {
|
|
|
5533
5533
|
namespace?: string;
|
|
5534
5534
|
limit?: number;
|
|
5535
5535
|
offset?: number;
|
|
5536
|
+
includeResult?: boolean;
|
|
5536
5537
|
}): Promise<{
|
|
5537
5538
|
data: Job[] | null;
|
|
5538
5539
|
error: Error | null;
|
|
@@ -5818,9 +5819,7 @@ declare class FluxbaseAdmin {
|
|
|
5818
5819
|
* Creates the first admin user and completes initial setup.
|
|
5819
5820
|
* This endpoint can only be called once.
|
|
5820
5821
|
*
|
|
5821
|
-
* @param
|
|
5822
|
-
* @param password - Admin password (minimum 12 characters)
|
|
5823
|
-
* @param name - Admin display name
|
|
5822
|
+
* @param request - Setup request containing email, password, and name
|
|
5824
5823
|
* @returns Authentication response with tokens
|
|
5825
5824
|
*
|
|
5826
5825
|
* @example
|
|
@@ -5841,8 +5840,7 @@ declare class FluxbaseAdmin {
|
|
|
5841
5840
|
*
|
|
5842
5841
|
* Authenticate as an admin user
|
|
5843
5842
|
*
|
|
5844
|
-
* @param
|
|
5845
|
-
* @param password - Admin password
|
|
5843
|
+
* @param request - Login request containing email and password
|
|
5846
5844
|
* @returns Authentication response with tokens
|
|
5847
5845
|
*
|
|
5848
5846
|
* @example
|
|
@@ -5860,7 +5858,7 @@ declare class FluxbaseAdmin {
|
|
|
5860
5858
|
/**
|
|
5861
5859
|
* Refresh admin access token
|
|
5862
5860
|
*
|
|
5863
|
-
* @param
|
|
5861
|
+
* @param request - Refresh request containing the refresh token
|
|
5864
5862
|
* @returns New access and refresh tokens
|
|
5865
5863
|
*
|
|
5866
5864
|
* @example
|
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;
|
|
@@ -2557,7 +2557,6 @@ declare class StorageBucket {
|
|
|
2557
2557
|
/**
|
|
2558
2558
|
* Download a file from the bucket
|
|
2559
2559
|
* @param path - The path/key of the file
|
|
2560
|
-
* @param options - Download options (use { stream: true } for streaming)
|
|
2561
2560
|
*
|
|
2562
2561
|
* @example
|
|
2563
2562
|
* ```typescript
|
|
@@ -3004,6 +3003,7 @@ declare class FluxbaseJobs {
|
|
|
3004
3003
|
namespace?: string;
|
|
3005
3004
|
limit?: number;
|
|
3006
3005
|
offset?: number;
|
|
3006
|
+
includeResult?: boolean;
|
|
3007
3007
|
}): Promise<{
|
|
3008
3008
|
data: Job[] | null;
|
|
3009
3009
|
error: Error | null;
|
|
@@ -5533,6 +5533,7 @@ declare class FluxbaseAdminJobs {
|
|
|
5533
5533
|
namespace?: string;
|
|
5534
5534
|
limit?: number;
|
|
5535
5535
|
offset?: number;
|
|
5536
|
+
includeResult?: boolean;
|
|
5536
5537
|
}): Promise<{
|
|
5537
5538
|
data: Job[] | null;
|
|
5538
5539
|
error: Error | null;
|
|
@@ -5818,9 +5819,7 @@ declare class FluxbaseAdmin {
|
|
|
5818
5819
|
* Creates the first admin user and completes initial setup.
|
|
5819
5820
|
* This endpoint can only be called once.
|
|
5820
5821
|
*
|
|
5821
|
-
* @param
|
|
5822
|
-
* @param password - Admin password (minimum 12 characters)
|
|
5823
|
-
* @param name - Admin display name
|
|
5822
|
+
* @param request - Setup request containing email, password, and name
|
|
5824
5823
|
* @returns Authentication response with tokens
|
|
5825
5824
|
*
|
|
5826
5825
|
* @example
|
|
@@ -5841,8 +5840,7 @@ declare class FluxbaseAdmin {
|
|
|
5841
5840
|
*
|
|
5842
5841
|
* Authenticate as an admin user
|
|
5843
5842
|
*
|
|
5844
|
-
* @param
|
|
5845
|
-
* @param password - Admin password
|
|
5843
|
+
* @param request - Login request containing email and password
|
|
5846
5844
|
* @returns Authentication response with tokens
|
|
5847
5845
|
*
|
|
5848
5846
|
* @example
|
|
@@ -5860,7 +5858,7 @@ declare class FluxbaseAdmin {
|
|
|
5860
5858
|
/**
|
|
5861
5859
|
* Refresh admin access token
|
|
5862
5860
|
*
|
|
5863
|
-
* @param
|
|
5861
|
+
* @param request - Refresh request containing the refresh token
|
|
5864
5862
|
* @returns New access and refresh tokens
|
|
5865
5863
|
*
|
|
5866
5864
|
* @example
|
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}` : ""}`
|
|
@@ -5846,9 +5855,7 @@ var FluxbaseAdmin = class {
|
|
|
5846
5855
|
* Creates the first admin user and completes initial setup.
|
|
5847
5856
|
* This endpoint can only be called once.
|
|
5848
5857
|
*
|
|
5849
|
-
* @param
|
|
5850
|
-
* @param password - Admin password (minimum 12 characters)
|
|
5851
|
-
* @param name - Admin display name
|
|
5858
|
+
* @param request - Setup request containing email, password, and name
|
|
5852
5859
|
* @returns Authentication response with tokens
|
|
5853
5860
|
*
|
|
5854
5861
|
* @example
|
|
@@ -5878,8 +5885,7 @@ var FluxbaseAdmin = class {
|
|
|
5878
5885
|
*
|
|
5879
5886
|
* Authenticate as an admin user
|
|
5880
5887
|
*
|
|
5881
|
-
* @param
|
|
5882
|
-
* @param password - Admin password
|
|
5888
|
+
* @param request - Login request containing email and password
|
|
5883
5889
|
* @returns Authentication response with tokens
|
|
5884
5890
|
*
|
|
5885
5891
|
* @example
|
|
@@ -5906,7 +5912,7 @@ var FluxbaseAdmin = class {
|
|
|
5906
5912
|
/**
|
|
5907
5913
|
* Refresh admin access token
|
|
5908
5914
|
*
|
|
5909
|
-
* @param
|
|
5915
|
+
* @param request - Refresh request containing the refresh token
|
|
5910
5916
|
* @returns New access and refresh tokens
|
|
5911
5917
|
*
|
|
5912
5918
|
* @example
|