# API reference skeld's packages publish their public API as entry points, such as `@skeld/core/server`. Import from these subpaths. Core, auth and data have no root export; `@skeld/openapi` has one, `@skeld/openapi` itself. ## Core API `@skeld/core` is the framework. | Entry point | Use it for | | ---------------------------------- | -------------------------------------------------------------------- | | [contract]() | Route declarations, request and reply types, shared error bodies | | [schema]() | Bounded schemas, composition, inferred types, sensitivity | | [server]() | Servers, plugins, hooks, cookies, origin policies, lifecycle options | | [worker]() | Running plugins and a gate in a process that serves no request | | [client]() | Typed calls and validated replies | | [http-error]() | HTTP failures and client-side call failures | | [boot-error]() | Startup and configuration failures | | [gate]() | The access gate a server boots and binds, and its refusals | | [secret]() | Wrapped secret values and explicit exposure | | [redact]() | Schema-aware redacted copies | | [log]() | Author loggers, classified fields, options, delivery statistics | | [redirect]() | Checking redirect destinations | | [json-schema]() | Exporting JSON Schema 2020-12 | ## Auth API `@skeld/auth` adds access control and authentication. Start with [Add authentication to a service](). | Entry point | Use it for | | ---------------------------------------------- | ------------------------------------------------------------------- | | [server]() | `createAuth`, its options, sessions, subjects, limits, access types | | [policy]() | Policies, grants, principals | | [routes]() | The session and OIDC route sets and the session state schema | | [auth-error]() | The error of server-side calls and grant operations | | [store]() | The store contract and `StoreFailure` | | [sqlite]() | The SQLite store | | [postgres]() | The PostgreSQL store over your `pg` Pool | | [store-conformance]() | The conformance kit for a store | | [api-key]() | The API-key part and its administration calls | | [jwt]() | JWT verification | | [oidc]() | OpenID Connect sign-in | | [password]() | Argon2id hashing and verification helpers | ## OpenAPI API `@skeld/openapi` generates OpenAPI documents from a contract. Start with [Publish an OpenAPI document](). | Entry point | Use it for | | ----------------------------------------- | --------------------------------------------------------------- | | [openapi]() | `createOpenApi`, its options, its result and the document types | | [openapi-error]() | The error a refused generation throws | ## Data API `@skeld/data` connects a service to PostgreSQL or SQLite. Start with [Store data in PostgreSQL or SQLite](). | Entry point | Use it for | | -------------------------------- | ---------------------------------------------------------------------------- | | [sql]() | The `sql` template tag, quoted identifiers and the parameter types | | [postgres]() | `createPostgresDatabase` and its options | | [sqlite]() | `createSqliteDatabase` and its options | | [database]() | The database, owner, query, transaction and reserved-connection types | | [data-error]() | `DataError`, its codes and `exposeDetail` | | [pg-pool]() | `toPgPool`, which runs `@skeld/auth`'s PostgreSQL store on a database's pool | | [limit]() | `limitRoutes`, `installLimitTable` and the limiter's options | The pages in `core/`, `auth/`, `openapi/` and `data/` are generated. Change the public source documentation and run `pnpm run api-docs`; do not edit those pages by hand. For a learning path, start at the [documentation home]().