balda 0.0.7 → 0.0.9
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/lib/index.cjs +16 -16
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +16 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +16 -16
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.cts
CHANGED
|
@@ -2883,6 +2883,7 @@ declare class LocalStorageProvider implements StorageInterface {
|
|
|
2883
2883
|
constructor(options: LocalStorageProviderOptions);
|
|
2884
2884
|
getDownloadUrl(_key: string, _expiresInSeconds?: number): Promise<string>;
|
|
2885
2885
|
getUploadUrl(_key: string, _expiresInSeconds?: number): Promise<string>;
|
|
2886
|
+
getPublicUrl(_key: string): Promise<string>;
|
|
2886
2887
|
listObjects(prefix?: string): Promise<string[]>;
|
|
2887
2888
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
2888
2889
|
putObject<T = Uint8Array>(key: string, value: T, _contentType?: string): Promise<void>;
|
|
@@ -2924,6 +2925,7 @@ declare class S3StorageProvider implements StorageInterface {
|
|
|
2924
2925
|
constructor(options: S3StorageProviderOptions);
|
|
2925
2926
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
2926
2927
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
2928
|
+
getPublicUrl(key: string): Promise<string>;
|
|
2927
2929
|
listObjects(prefix?: string): Promise<string[]>;
|
|
2928
2930
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
2929
2931
|
putObject<T = Uint8Array>(key: string, value: T, contentType?: string): Promise<void>;
|
|
@@ -2941,14 +2943,26 @@ interface StorageInterface {
|
|
|
2941
2943
|
* Get the download signed url of the object
|
|
2942
2944
|
* @param key - The key of the object
|
|
2943
2945
|
* @returns The download signed url of the object
|
|
2946
|
+
* @warning not available in local storage provider
|
|
2947
|
+
* @throws if using local storage provider
|
|
2944
2948
|
*/
|
|
2945
2949
|
getDownloadUrl: (key: string, expiresInSeconds?: number) => Promise<string>;
|
|
2946
2950
|
/**
|
|
2947
2951
|
* Get the upload signed url of the object
|
|
2948
2952
|
* @param key - The key of the object
|
|
2949
2953
|
* @returns The upload signed url of the object
|
|
2954
|
+
* @warning not available in local storage provider
|
|
2955
|
+
* @throws if using local storage provider
|
|
2950
2956
|
*/
|
|
2951
2957
|
getUploadUrl: (key: string, expiresInSeconds?: number) => Promise<string>;
|
|
2958
|
+
/**
|
|
2959
|
+
* Get the public url of the object
|
|
2960
|
+
* @param key - The key of the object
|
|
2961
|
+
* @returns The public url of the object
|
|
2962
|
+
* @warning not available in local storage provider
|
|
2963
|
+
* @throws if using local storage provider
|
|
2964
|
+
*/
|
|
2965
|
+
getPublicUrl: (key: string) => Promise<string>;
|
|
2952
2966
|
/**
|
|
2953
2967
|
* List the objects from the storage
|
|
2954
2968
|
* @param prefix - The prefix of the objects
|
|
@@ -3026,6 +3040,7 @@ declare class AzureBlobStorageProvider implements StorageInterface {
|
|
|
3026
3040
|
constructor(options: BlobStorageProviderOptions);
|
|
3027
3041
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3028
3042
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3043
|
+
getPublicUrl(key: string): Promise<string>;
|
|
3029
3044
|
listObjects(prefix?: string): Promise<string[]>;
|
|
3030
3045
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
3031
3046
|
putObject<T = Uint8Array>(key: string, value: T, contentType?: string): Promise<void>;
|
|
@@ -3046,6 +3061,7 @@ declare class Storage<T extends StorageProviderOptions> implements StorageInterf
|
|
|
3046
3061
|
use(provider: keyof T): StorageInterface;
|
|
3047
3062
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3048
3063
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3064
|
+
getPublicUrl(key: string): Promise<string>;
|
|
3049
3065
|
listObjects(prefix?: string): Promise<string[]>;
|
|
3050
3066
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
3051
3067
|
putObject<T = Buffer<ArrayBufferLike>>(key: string, value: T, contentType?: string): Promise<void>;
|
package/lib/index.d.ts
CHANGED
|
@@ -2883,6 +2883,7 @@ declare class LocalStorageProvider implements StorageInterface {
|
|
|
2883
2883
|
constructor(options: LocalStorageProviderOptions);
|
|
2884
2884
|
getDownloadUrl(_key: string, _expiresInSeconds?: number): Promise<string>;
|
|
2885
2885
|
getUploadUrl(_key: string, _expiresInSeconds?: number): Promise<string>;
|
|
2886
|
+
getPublicUrl(_key: string): Promise<string>;
|
|
2886
2887
|
listObjects(prefix?: string): Promise<string[]>;
|
|
2887
2888
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
2888
2889
|
putObject<T = Uint8Array>(key: string, value: T, _contentType?: string): Promise<void>;
|
|
@@ -2924,6 +2925,7 @@ declare class S3StorageProvider implements StorageInterface {
|
|
|
2924
2925
|
constructor(options: S3StorageProviderOptions);
|
|
2925
2926
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
2926
2927
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
2928
|
+
getPublicUrl(key: string): Promise<string>;
|
|
2927
2929
|
listObjects(prefix?: string): Promise<string[]>;
|
|
2928
2930
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
2929
2931
|
putObject<T = Uint8Array>(key: string, value: T, contentType?: string): Promise<void>;
|
|
@@ -2941,14 +2943,26 @@ interface StorageInterface {
|
|
|
2941
2943
|
* Get the download signed url of the object
|
|
2942
2944
|
* @param key - The key of the object
|
|
2943
2945
|
* @returns The download signed url of the object
|
|
2946
|
+
* @warning not available in local storage provider
|
|
2947
|
+
* @throws if using local storage provider
|
|
2944
2948
|
*/
|
|
2945
2949
|
getDownloadUrl: (key: string, expiresInSeconds?: number) => Promise<string>;
|
|
2946
2950
|
/**
|
|
2947
2951
|
* Get the upload signed url of the object
|
|
2948
2952
|
* @param key - The key of the object
|
|
2949
2953
|
* @returns The upload signed url of the object
|
|
2954
|
+
* @warning not available in local storage provider
|
|
2955
|
+
* @throws if using local storage provider
|
|
2950
2956
|
*/
|
|
2951
2957
|
getUploadUrl: (key: string, expiresInSeconds?: number) => Promise<string>;
|
|
2958
|
+
/**
|
|
2959
|
+
* Get the public url of the object
|
|
2960
|
+
* @param key - The key of the object
|
|
2961
|
+
* @returns The public url of the object
|
|
2962
|
+
* @warning not available in local storage provider
|
|
2963
|
+
* @throws if using local storage provider
|
|
2964
|
+
*/
|
|
2965
|
+
getPublicUrl: (key: string) => Promise<string>;
|
|
2952
2966
|
/**
|
|
2953
2967
|
* List the objects from the storage
|
|
2954
2968
|
* @param prefix - The prefix of the objects
|
|
@@ -3026,6 +3040,7 @@ declare class AzureBlobStorageProvider implements StorageInterface {
|
|
|
3026
3040
|
constructor(options: BlobStorageProviderOptions);
|
|
3027
3041
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3028
3042
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3043
|
+
getPublicUrl(key: string): Promise<string>;
|
|
3029
3044
|
listObjects(prefix?: string): Promise<string[]>;
|
|
3030
3045
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
3031
3046
|
putObject<T = Uint8Array>(key: string, value: T, contentType?: string): Promise<void>;
|
|
@@ -3046,6 +3061,7 @@ declare class Storage<T extends StorageProviderOptions> implements StorageInterf
|
|
|
3046
3061
|
use(provider: keyof T): StorageInterface;
|
|
3047
3062
|
getDownloadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3048
3063
|
getUploadUrl(key: string, expiresInSeconds?: number): Promise<string>;
|
|
3064
|
+
getPublicUrl(key: string): Promise<string>;
|
|
3049
3065
|
listObjects(prefix?: string): Promise<string[]>;
|
|
3050
3066
|
getObject<R extends ReturnType$1 = "raw">(key: string, returnType?: R): Promise<ReturnTypeMap<R>>;
|
|
3051
3067
|
putObject<T = Buffer<ArrayBufferLike>>(key: string, value: T, contentType?: string): Promise<void>;
|