diff --git a/src/main.ts b/src/main.ts index 522f2b4..fb71d5a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,2 +1,12 @@ export { getDeployStore, getStore } from './store_factory.ts' export { BlobsServer } from './server.ts' +export type { + Store, + StoreOptions, + GetWithMetadataOptions, + GetWithMetadataResult, + ListOptions, + ListResultBlob, + SetOptions, + BlobResponseType, +} from './store.ts' diff --git a/src/store.ts b/src/store.ts index f4858a3..9a085f2 100644 --- a/src/store.ts +++ b/src/store.ts @@ -18,13 +18,13 @@ interface NamedStoreOptions extends BaseStoreOptions { name: string } -type StoreOptions = DeployStoreOptions | NamedStoreOptions +export type StoreOptions = DeployStoreOptions | NamedStoreOptions -interface GetWithMetadataOptions { +export interface GetWithMetadataOptions { etag?: string } -interface GetWithMetadataResult { +export interface GetWithMetadataResult { etag?: string metadata: Metadata } @@ -34,18 +34,18 @@ export interface ListResult { directories: string[] } -interface ListResultBlob { +export interface ListResultBlob { etag: string key: string } -interface ListOptions { +export interface ListOptions { directories?: boolean paginate?: boolean prefix?: string } -interface SetOptions { +export interface SetOptions { /** * Arbitrary metadata object to associate with an entry. Must be seralizable * to JSON. @@ -53,7 +53,7 @@ interface SetOptions { metadata?: Metadata } -type BlobResponseType = 'arrayBuffer' | 'blob' | 'json' | 'stream' | 'text' +export type BlobResponseType = 'arrayBuffer' | 'blob' | 'json' | 'stream' | 'text' export class Store { private client: Client