Shared infrastructure for all Distilled SDKs. Provides the client factory, HTTP trait annotations, error classes, error categories, pagination utilities, and retry policies.
client.ts—API.make()andAPI.makePaginated()factories that create Effect operations from annotated schemastraits.ts— Schema annotations for HTTP bindings (T.Http,T.PathParam,T.HttpHeader,T.JsonName, etc.)errors.ts— Base error classes (NotFound,Unauthorized,Forbidden,TooManyRequests, etc.) with status code matchingcategory.ts— Error categories (AuthError,ThrottlingError,ServerError, etc.) for retry logic and semantic groupingpagination.ts—paginatePages/paginateItemsstream utilitiesretry.ts— Retry policy configurationsensitive.ts— Sensitive data schemas (wraps values inRedacted)json-patch.ts— JSON Patch (RFC 6902) implementation for spec patching
This package is not intended to be used directly. It's a dependency of the provider SDKs (@distilled.cloud/aws, @distilled.cloud/cloudflare, etc.).
// Provider packages import from core like this:
import { makeAPI } from "@distilled.cloud/sdk-core/client";
import * as T from "@distilled.cloud/sdk-core/traits";
import { NotFound, Forbidden } from "@distilled.cloud/sdk-core/errors";
import * as Category from "@distilled.cloud/sdk-core/category";MIT