Documentation Index
Fetch the complete documentation index at: https://docs.myme.so/llms.txt
Use this file to discover all available pages before exploring further.
Namespaces
The client exposes one property per resource, plus top-levelsearch and health:
client.items— item CRUD, transitions, versions, statsclient.metadata— tags, metadata merge operationsclient.extensions— namespaced sidecar dataclient.edges— edges and custom edge typesclient.blobs— upload, download, URLsclient.types— type schema listing and registrationclient.keys— API key management (admin)client.webhooks— webhook registration and deliveriesclient.search(query:filters:)— full-text searchclient.health()— server reachability check
Items
items.list returns PaginatedResult<Item> with data, cursor, hasMore. Two AsyncSequence helpers walk every page automatically — client.items.all(filters:) yields Item, and client.items.allWithMetadata(filters:) yields ItemWithMetadata pairs for views that render tags or favorite flags alongside the item.
Edges
Batched backrefs
edges.listToTargets(targetIds:edgeType:limit:) resolves inbound edges for many targets in one call:
TaskGroup; cap concurrency via ClientConfiguration.maxBackrefBatchConcurrency (default 8). Empty targetIds short-circuits to [:], duplicate ids are deduplicated, and unknown ids map to an empty array.
Atomic item + edges
Custom edge types
Mirrors the TypeScript SDK’sclient.edges.types.*. Admin-gated server-side.
Bulk writes and chunked iteration
Admin-only bulk surfaces match the bulk operations shape. Pure-local clients iterate through the local store and return per-record outcomes; synced clients enqueue a single replay record; network clients round-trip straight through.items.bulkAll and edges.bulkAll. Both clamp batchSize to [1, 5000], aggregate per-record outcomes with absolute indices preserved, and accept an optional progressHandler for UI wiring.
atomic: true guarantee stops at its own server transaction. Callers needing strict all-or-nothing semantics across a run larger than one batch reconcile failures out-of-band.
items.bulkAction(_:) is the filter-driven sibling of items.bulk — instead of taking a list of records, it applies one action across every item matching a BulkActionFilter. Use it to archive, trash, restore, purge, retag, flip tier, patch properties, or bump updated_at across a server-side slice without fetching ids first.
BulkActionInput is a discriminated enum — .transition, .purge, .updateTags, .updateLibrary, .updateProperties, .updateTimestamp. Purge requires options.confirm == "PURGE". Synced clients queue the action for replay; pure-local clients apply it in a single local-store transaction.
In remote mode, bulkAction(_:options:) polls the server-side job until it reaches a terminal status — completed, failed, or cancelled. Surface progress to the UI by passing BulkActionPollOptions(onProgress:):
bulkActionAsync(_:) POSTs and returns the BulkActionJob envelope without polling; bulkActionStatus(jobId:) and bulkActionCancel(jobId:) wrap the GET / DELETE endpoints. Cancellation throws BulkJobCancelledError; a failed job throws BulkJobFailedError carrying the worker’s reason.
Metadata
metadata.listTags() is mode-aware. In synced and pure-local modes the call fetches metadata rows whose parent item is not trashed and buckets the tags in Swift; in remote mode it hits GET /metadata/tags. Either way the return shape is [TagWithCount] ordered count DESC, tag ASC. Local-mode reads short-circuit the network round-trip.
The tier field sits on the item itself, not in metadata. Set it on create via CreateItemInput.tier, or flip it post-creation via items.update(id:properties:options:) with UpdateOptions(tier: .library). Tier-only updates don’t conflict — tier is metadata-axis, last-writer-wins. system.* items have no tier; the field is optional in the SDK shape (Tier?).
Consuming per-item metadata in UIs
Two paths, depending on client mode:-
Synced / pure-local mode. Apps render lists of items with their tags or favorite flag — a timeline, a grid, a detail view. Use the SDK’s reactive layer rather than polling. In Swift,
store.queryItemsWithMetadata(filters:)returns an@Observable ItemsWithMetadataQuerythat re-emits[ItemWithMetadata]pairs whenever any matching item or metadata row changes. The query reads from the local SQLite store, so no network round-trip per view frame. See SwiftUI reactive queries for the full list. -
Remote-only mode. Fetch pairs in bulk via
client.items.listWithMetadata(filters:)(wire:GET /items?include=metadata). For ad-hoc single-item lookups useclient.metadata.get(itemId:).
listWithMetadata on each mutation. With ItemsWithMetadataQuery available, that bespoke plumbing is redundant — the SDK owns the observation and invalidation.
Extensions
Namespaced sidecar data. Writes route through the mutation queue in synced mode.Blobs
upload accepts an optional onProgress: (@Sendable (Int64, Int64) -> Void)? for network-only clients that want inline byte-progress updates. The callback fires on the URLSession delegate queue with (bytesSent, totalBytes) — hop to the main actor yourself if you’re driving SwiftUI state from it. Synced-mode clients ignore the callback; progress for queued uploads arrives via BlobUploadProgressQuery on the reactive layer instead.
Search
SearchFilters.tier is a TierFilter? — pass .library or .feed to narrow, or omit (nil) to return both. There’s no .all synonym; nil already expresses that. SearchFilters.tags requires items to have every listed tag. system.* items are excluded from search by default; opt in with an explicit type: "system.<X>" filter.