System model
PBJClient constructs ten focused resource objects backed by one configured transport. Resource methods choose routes and serialize input; the transport handles everything common to an HTTP request.
Your application
↓PBJClient
↓Work
Integrations
Insights
Shared HTTP transport
↓PBJ REST API
SDK layers
| Layer | Location | Responsibility |
|---|---|---|
| Client | src/client/ | Validates configuration and initializes every resource. |
| Resources | src/resources/ | Maps public methods to routes and typed contracts. |
| Transport | src/transport/ | Owns auth, timeouts, retries, parsing, and errors. |
| Types | src/types/ | Defines public inputs, outputs, and shared contracts. |
| Utilities | src/utils/ | Identifier validation and lazy pagination helpers. |
Network boundary
The SDK communicates only with the configured PBJ API. GitHub connections and Solana data are requested through PBJ endpoints; the SDK does not call GitHub or Solana RPC directly.
Deliberately statelessThere is no response cache, background polling, wallet signing, or persistent credential storage in the package.
Package structure
text
src/
├── client/ # PBJClient and configuration
├── resources/ # Projects, tasks, Solana, analytics, AI
├── transport/ # HTTP client, retries, typed errors
├── types/ # Public TypeScript contracts
├── utils/ # Validation and pagination
└── index.ts # Supported package entry point