@meistrari/vault-sdk 0.0.9 → 0.0.10

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.d.mts CHANGED
@@ -23,8 +23,6 @@ type VaultParams = {
23
23
  authStrategy: AuthStrategy;
24
24
  vaultUrl: string;
25
25
  };
26
- type DownloadResponseType = 'blob' | 'base64';
27
- type DownloadResponse<T extends DownloadResponseType> = T extends 'blob' ? Blob : string;
28
26
  declare class VaultFile {
29
27
  readonly name: string;
30
28
  readonly vaultUrl: string;
@@ -37,7 +35,8 @@ declare class VaultFile {
37
35
  refreshAuth(authStrategy: AuthStrategy): void;
38
36
  _fetch(params: FetchParams): Promise<any>;
39
37
  upload(file: Blob): Promise<void>;
40
- download<T extends DownloadResponseType = 'blob'>(responseType?: T): Promise<DownloadResponse<T>>;
38
+ download(responseType?: 'blob'): Promise<Blob>;
39
+ download(responseType: 'base64'): Promise<string>;
41
40
  }
42
41
 
43
42
  declare class FetchError extends Error {
package/dist/index.d.ts CHANGED
@@ -23,8 +23,6 @@ type VaultParams = {
23
23
  authStrategy: AuthStrategy;
24
24
  vaultUrl: string;
25
25
  };
26
- type DownloadResponseType = 'blob' | 'base64';
27
- type DownloadResponse<T extends DownloadResponseType> = T extends 'blob' ? Blob : string;
28
26
  declare class VaultFile {
29
27
  readonly name: string;
30
28
  readonly vaultUrl: string;
@@ -37,7 +35,8 @@ declare class VaultFile {
37
35
  refreshAuth(authStrategy: AuthStrategy): void;
38
36
  _fetch(params: FetchParams): Promise<any>;
39
37
  upload(file: Blob): Promise<void>;
40
- download<T extends DownloadResponseType = 'blob'>(responseType?: T): Promise<DownloadResponse<T>>;
38
+ download(responseType?: 'blob'): Promise<Blob>;
39
+ download(responseType: 'base64'): Promise<string>;
41
40
  }
42
41
 
43
42
  declare class FetchError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/vault-sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",