StorageAdapter
Defined in: packages/api-client/src/core/storage/StorageAdapter.ts:10
Async key/value storage abstraction. Consumers wire the concrete impl at client construction time so the SDK stays platform-agnostic.
Methods are async even when a particular runtime offers a synchronous
equivalent (e.g. localStorage). React Native’s AsyncStorage is
intrinsically async; mirroring that contract avoids leaking platform
differences into the SDK surface.
Methods
Section titled “Methods”getItem()
Section titled “getItem()”getItem(
key):Promise<string|null>
Defined in: packages/api-client/src/core/storage/StorageAdapter.ts:12
Returns the stored value, or null when no entry exists.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string | null>
removeItem()
Section titled “removeItem()”removeItem(
key):Promise<void>
Defined in: packages/api-client/src/core/storage/StorageAdapter.ts:16
Removes the entry at key. Idempotent — no-op when absent.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
setItem()
Section titled “setItem()”setItem(
key,value):Promise<void>
Defined in: packages/api-client/src/core/storage/StorageAdapter.ts:14
Persists the value, overwriting any existing entry under key.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<void>