Skip to content

Commit 2d64083

Browse files
committed
feat: export Store types
1 parent 25ff62c commit 2d64083

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/main.ts

+10
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
export { getDeployStore, getStore } from './store_factory.ts'
22
export { BlobsServer } from './server.ts'
3+
export type {
4+
Store,
5+
StoreOptions,
6+
GetWithMetadataOptions,
7+
GetWithMetadataResult,
8+
ListOptions,
9+
ListResultBlob,
10+
SetOptions,
11+
BlobResponseType,
12+
} from './store.ts'

src/store.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ interface NamedStoreOptions extends BaseStoreOptions {
1818
name: string
1919
}
2020

21-
type StoreOptions = DeployStoreOptions | NamedStoreOptions
21+
export type StoreOptions = DeployStoreOptions | NamedStoreOptions
2222

23-
interface GetWithMetadataOptions {
23+
export interface GetWithMetadataOptions {
2424
etag?: string
2525
}
2626

27-
interface GetWithMetadataResult {
27+
export interface GetWithMetadataResult {
2828
etag?: string
2929
metadata: Metadata
3030
}
@@ -34,26 +34,26 @@ export interface ListResult {
3434
directories: string[]
3535
}
3636

37-
interface ListResultBlob {
37+
export interface ListResultBlob {
3838
etag: string
3939
key: string
4040
}
4141

42-
interface ListOptions {
42+
export interface ListOptions {
4343
directories?: boolean
4444
paginate?: boolean
4545
prefix?: string
4646
}
4747

48-
interface SetOptions {
48+
export interface SetOptions {
4949
/**
5050
* Arbitrary metadata object to associate with an entry. Must be seralizable
5151
* to JSON.
5252
*/
5353
metadata?: Metadata
5454
}
5555

56-
type BlobResponseType = 'arrayBuffer' | 'blob' | 'json' | 'stream' | 'text'
56+
export type BlobResponseType = 'arrayBuffer' | 'blob' | 'json' | 'stream' | 'text'
5757

5858
export class Store {
5959
private client: Client

0 commit comments

Comments
 (0)