PBJ SDK documentation

Architecture

Understand how PBJClient, resource modules, the shared HTTP transport, public types, and pagination helpers fit together.

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

LayerLocationResponsibility
Clientsrc/client/Validates configuration and initializes every resource.
Resourcessrc/resources/Maps public methods to routes and typed contracts.
Transportsrc/transport/Owns auth, timeouts, retries, parsing, and errors.
Typessrc/types/Defines public inputs, outputs, and shared contracts.
Utilitiessrc/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