Interfaces
@system-inc/base-foundation · 515c140 · 15 symbols
CfDurableObjectSettings
Members
namespace:stringrpcEndPoint?:string
KeyValueListOptions
Members
cursor?:string | nulllimit?:numberprefix?:string | null
KeyValuePutOptions
Members
expiration?:numberexpirationTtl?:numbermetadata?:object | null
KeyValueStorage
Key-Value storage is different from the database in base, database would expect to be a SQL database, while key-value storage is a simple no-SQL storage, expecting to have fast read and write operations.
Members
delete(key:string):Promise<void>get(key:string):Promise<ValueType | null>list(options?:KeyValueListOptions):Promise<KeyValueListResult<ListKeyType>>put(key:string,value:ValueType,options?:KeyValuePutOptions):Promise<void>
KeyValueStorageSettings
Members
stores:({ name: string; storageType: KeyValueStorageType })[]
ObjectStore
Interface to an Object Store, e.g. S3, GCS, R2, etc. Using an S3 compatible interface.
Members
bucket:ObjectStoreBucketThe bucket backing this store.
type:ObjectStoreTypeThe type of store. Could be S3, GCS, R2, etc.
Currently only R2 is supported.
delete(key:string | string[]):Promise<void>Deletes the object with the given key.
get(key:string):Promise<StoredObjectData & StoredObjectMetaData | null>Retrieves the object with the given key.
head(key:string):Promise<StoredObjectMetaData | null>Retrieves the metadata for the object with the given key.
list(options?:ObjectStoreListOptions):Promise<ObjectStoreListResult>Lists objects in the store matching the given options. Supports prefix filtering and delimiter-based folder browsing.
When a delimiter is provided (typically '/'), the result includes
delimitedPrefixes— virtual folder paths at the current level.put(key:string,data:string | ArrayBuffer | ReadableStream<any> | ArrayBufferView<ArrayBufferLike> | Blob,options?:ObjectStorePutOptions):Promise<StoredObjectMetaData | null>Adds the given data to the store with the given key.
ObjectStoreHttpMetadata
HTTP metadata to associate with the stored object. These are returned as HTTP headers when the object is fetched.
Members
cacheControl?:stringcacheExpiry?:DatecontentDisposition?:stringcontentEncoding?:stringcontentLanguage?:stringcontentType?:string
ObjectStoreListOptions
Options for listing objects in the store.
Members
cursor?:stringOpaque token for pagination. Use the
cursorfrom a previous truncated result to fetch the next page.delimiter?:stringCharacter used to group keys into virtual folders. Typically '/'. When set, results include
delimitedPrefixesfor keys that share a common prefix up to the delimiter.limit?:numberMaximum number of objects to return. Default varies by provider (R2: 1000).
prefix?:stringOnly return objects whose keys start with this prefix.
startAfter?:stringOnly return objects whose keys are lexicographically after this value.
ObjectStoreListResult
The result of a list operation.
Members
cursor?:stringOpaque cursor for fetching the next page. Only present when
truncatedis true.delimitedPrefixes:string[]Virtual folder prefixes when a delimiter is used. For example, with prefix='photos/' and delimiter='/', this might contain ['photos/2025/', 'photos/2026/'].
objects:StoredObjectMetaData[]The objects matching the list query.
truncated:booleanWhether there are more results beyond this page.
ObjectStorePutOptions
Options for the put() method.
Members
customMetadata?:Record<string, string>httpMetadata?:ObjectStoreHttpMetadatastorageClass?:"Standard" | "InfrequentAccess"
ObjectStoreSettings
Worker-level settings for object storage (R2 / S3-compatible buckets).
Buckets are declared once here at the worker root and can be consumed
directly via InjectObjectStore without opting into the full
FileStorage module. Higher-level modules (FileStorage, etc.) read
buckets from this settings block by name.
Members
buckets:readonly ObjectStoreBucket[]The R2/S3 buckets available to this worker.
PrivateObjectStoreBucket
A private bucket (no public URL). Domains are not allowed.
extends ObjectStoreBucketBase
Members
binding:stringThe binding name for the bucket. Should match 'binding' in wrangler.toml.
domains?:undefinedname:stringThe name of the bucket. Should match 'bucket_name' in wrangler.toml.
privateBucket:true
PublicObjectStoreBucket
A public bucket with a required domain map (environment → hostname).
extends ObjectStoreBucketBase
Members
binding:stringThe binding name for the bucket. Should match 'binding' in wrangler.toml.
domains:NamedConfiguration<string>Domain map for public buckets (environment → hostname).
name:stringThe name of the bucket. Should match 'bucket_name' in wrangler.toml.
privateBucket?:false
StoredObjectData
The data of a stored object. It could be stored in a variety of formats, e.g. binary, text, json, etc.
Members
body:ReadableStreambodyUsed:booleanarrayBuffer():Promise<ArrayBuffer>blob():Promise<Blob>json():Promise<T>text():Promise<string>
StoredObjectMetaData
Metadata about a stored object.
Members
etag:stringhttpEtag:stringkey:stringsize:numberuploaded:Dateversion:string