Search by

vch-lt / path

vch

PHP SDK and Craft CMS adapter for Path patient tracking software

Package info

github.com/learnwithus/path-api-sdk

Language:TypeScript

pkg:composer/vch-lt/path

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

v0.8.1 2026-11-24 20:45 UTC

README

Path SDK connects course websites to the Path learner API. This repository publishes the JavaScript package @vch-lt/path and Composer package vch-lt/path from the same source commit and version tag.

Shared contract

Both languages expose the same primary operations:

  • getLearnerState() returns user, course, milestones, and progress at the state root.
  • checkAuth() returns the authenticated user or null.
  • The authenticated user's read-only course attributes are at user.attributes.
  • Learner-store data is fetched separately and only when requested.
  • Progress is looked up by milestone slug with getProgress(state, slug).
  • A milestone's type is a Path data-field type (text, textarea, number, date, datetime, boolean, select, multiselect, text_array, object, object_array) or completion, which records no value. Path reports each milestone's valueType, the JSON shape of its value (string, number, boolean, string[], object, or object[]; null for completion). A select or multiselect milestone lists its choices in options.
  • An object milestone records a group of named values, and an object_array milestone a list of such groups. Their fields list each field's key, label, Path fieldType, and valueType. fields is null for other types.

The Path wire response places attributes at its root. Each SDK moves those values onto the authenticated user. If any learner-state request, authorization, server, network, decoding, or response-shape error occurs, the read resolves to this stable logged-out state:

user = null
course = null
milestones = []
progress = []

Progress, learner-store, and logout operations are strict and report errors. Applications that redirect when user is null will therefore also redirect during a Path outage.

Guides

This release supports Path's current raw ?path-token= login callback. It does not implement the pending PKCE registration/activity API; that protocol requires a later breaking SDK release.