JavaScript API
Everything pb_hooks and page code can call, generated from the TypeScript declarations PocketOne ships (the same ones your app's types.d.ts gets, so your editor knows them too).
PocketBase
What core gives every app: the globals, hooks, functions and classes ($app, $apis, $security, routerAdd, cronAdd, onRecordCreate, new Record()...), and the types they hand you, one page per Go namespace:
- PocketBase's: apis, auth, blob, core, cron, dbx, filesystem, forms, hook, logger, mailer, pocketbase, router, search, store, subscriptions, template, types
- From the Go libraries it builds on: bufio, bytes, cobra, context, exec, filepath, fs, http, io, jwt, multipart, net, oauth2, os, ozzo_validation, slog, sql, sync, syntax, syscall, textproto, time, url
Extensions
Each PocketOne extension adds to that: a global such as $llm, functions to bind hooks, types. Each page below lists what one extension adds. An extension that's off on your app adds nothing.
| Extension | Adds |
|---|---|
| API Tokens | tokens, $apiTokens |
| Bulk Mail | bulkmail, $bulkmail |
| Key-Value Store | $kv |
| LLM | $llm |
| MCP | mcp, $mcp |
| Pages | pages, JSX |
| WASM | $wasm |
| Contract hooks | contracts, onContracts, ContractError, contracts.bulkmail.v1, onBulkmailCount, onBulkmailStart, onBulkmailPause, onBulkmailResume, and 94 more |
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.