Project / brightspace-lms

A production-grade Brightspace API client for TypeScript apps

I built brightspace-lms to make the D2L Valence API easier to ship against in real products. It wraps authentication, retries, middleware, version compatibility checks, pagination, and typed resource calls into one reusable SDK.

TypeScriptD2L BrightspaceOpen sourceMIT licensed

Package

brightspace-lms

Published on npm with TypeScript-first APIs, CJS/ESM outputs, and declaration files.

First release0.1.0
RuntimeNode 24
LicenseMIT

Capability

What the client solves

Auth flows built in

Bearer token, OAuth2 authorization code, OAuth2 client credentials, and legacy ID-Key support are all wrapped behind a consistent client interface.

Version negotiation

The client checks API component compatibility with POST /d2l/api/versions/check and pins tested versions so integrations fail fast when hosts are too old.

Resource-first API

Instead of hand-rolling HTTP calls, apps use typed namespaces like users, enrollments, grades, quizzes, dropboxes, calendar, org units, and more.

Context

Why I built this

The Brightspace API is powerful, but shipping against it repeatedly means rebuilding the same plumbing every time.

I first wrote this library while building Vita Learning. The goal was to move product code away from low-level request wiring and into typed domain actions. Instead of manually handling auth headers, rate-limit retries, endpoint version checks, and cursor bookmarks, apps call methods like client.users.whoami() or client.grades.listObjects(orgUnitId).

Coverage

Resource surface

Learning Platform (lp)

usersenrollmentsorgUnitscoursesgroupsdemographicsnews

Learning Environment (le)

gradesquizzesdropboxesassessmentscalendardiscussionscontentsurveyschecklistsoutcomesreleaseConditionsaccommodations

Admin / Other

awards (bas)versions.check()