a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm

docs(client): flesh out prerequisite section a little bit

mary.my.id 00af99bb 477707f4

verified
Changed files
+35 -3
packages
clients
client
+35 -3
packages/clients/client/README.md
··· 3 3 lightweight and cute API client for AT Protocol. 4 4 5 5 ```sh 6 - npm install @atcute/client 6 + npm install @atcute/client @atcute/bluesky 7 7 ``` 8 8 9 - ## definition packages 9 + ## prerequisites 10 + 11 + the client requires a definition package to know what queries and procedures are available. install 12 + one alongside the client: 13 + 14 + ```sh 15 + npm install @atcute/client @atcute/bluesky 16 + ``` 10 17 11 - by default, the client has no type definitions for queries or procedures. 18 + then register the type definitions using one of these methods: 19 + 20 + ```jsonc 21 + // tsconfig.json 22 + { 23 + "compilerOptions": { 24 + "types": ["@atcute/bluesky"], 25 + }, 26 + } 27 + ``` 28 + 29 + ```ts 30 + // env.d.ts 31 + /// <reference types="@atcute/bluesky" /> 32 + ``` 33 + 34 + ```ts 35 + // or as an import in your entrypoint 36 + import type {} from '@atcute/bluesky'; 37 + ``` 38 + 39 + now the XRPC methods will have full type information for the registered schemas. 40 + 41 + available packages: 12 42 13 43 | package | schemas | 14 44 | ------------------------------------------------------------------ | --------------------------------------- | ··· 22 52 | [`@atcute/microcosm`](../../definitions/microcosm) | `blue.microcosm.*`, `com.bad-example.*` | 23 53 | [`@atcute/pckt`](../../definitions/pckt) | `blog.pckt.*` | 24 54 | [`@atcute/lexicon-community`](../../definitions/lexicon-community) | `community.lexicon.*` | 55 + 56 + you can register multiple packages to combine their types. 25 57 26 58 ## usage 27 59