@playcademy/sandbox 0.11.1-beta.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -199,17 +199,18 @@ bunx @playcademy/sandbox \
199
199
  --timeback-student-id your-student-sourcedId
200
200
  ```
201
201
 
202
- | Option | Description |
203
- | :------------------------------- | :----------------------------------------------------- |
204
- | `--timeback-local` | Enable local TimeBack mode (Docker) |
205
- | `--timeback-oneroster-url <url>` | OneRoster API URL |
206
- | `--timeback-caliper-url <url>` | Caliper API URL |
207
- | `--timeback-course-id <id>` | Course ID for enrollments |
208
- | `--timeback-student-id <id>` | Student ID to link to demo user |
209
- | `--timeback-role <role>` | User role (student, parent, teacher, administrator) |
210
- | `--timeback-org-id <id>` | Organization ID |
211
- | `--timeback-org-name <name>` | Organization display name |
212
- | `--timeback-org-type <type>` | Organization type (school, district, department, etc.) |
202
+ | Option | Description |
203
+ | :-------------------------------------- | :-------------------------------------------------------------------------------- |
204
+ | `--timeback-local` | Enable local TimeBack mode (Docker) |
205
+ | `--timeback-oneroster-url <url>` | OneRoster API URL |
206
+ | `--timeback-caliper-url <url>` | Caliper API URL |
207
+ | `--timeback-course-id <id>` | Course ID for enrollments |
208
+ | `--timeback-student-id <id>` | Student ID to link to demo user |
209
+ | `--timeback-role <role>` | User role (student, parent, teacher, administrator) |
210
+ | `--timeback-org-id <id>` | Organization ID |
211
+ | `--timeback-org-name <name>` | Organization display name |
212
+ | `--timeback-org-type <type>` | Organization type (school, district, department, etc.) |
213
+ | `--timeback-excluded-courses <courses>` | Comma-separated courses to exclude from enrollment (e.g. `FastMath:3,FastMath:4`) |
213
214
 
214
215
  ### Environment Variables
215
216
 
@@ -262,15 +263,34 @@ The sandbox provides these TimeBack endpoints (matching production platform):
262
263
  **Runtime:**
263
264
 
264
265
  - `POST /api/timeback/end-activity` - Submit activity results
265
-
266
- **XP Queries:**
267
-
268
- - `GET /api/timeback/xp/today` - Get today's XP
269
- - `PUT /api/timeback/xp/today` - Update today's XP
270
- - `GET /api/timeback/xp/total` - Get total XP
271
- - `GET /api/timeback/xp/history` - Get XP history
272
-
273
- These use the same api-core handlers as the production platform, ensuring consistency.
266
+ - `POST /api/timeback/heartbeat` - Record incremental activity heartbeat
267
+ - `POST /api/timeback/advance-course` - Advance a student to the next-grade course
268
+ - `POST /api/timeback/unenroll-course` - Unenroll a student from their active course
269
+ - `POST /api/timeback/populate-student` - No-op in the sandbox (always returns `no_record`)
270
+
271
+ **Assessments:**
272
+
273
+ - `POST /api/timeback/assessments/prepare` - Prepare the next assessment attempt
274
+ - `POST /api/timeback/assessments/start` - Start a new assessment attempt
275
+ - `GET /api/timeback/assessments/latest` - Get the user's latest attempt
276
+ - `GET /api/timeback/assessments/:attemptId` - Get a specific attempt
277
+ - `POST /api/timeback/assessments/:attemptId/resume` - Resume an attempt
278
+ - `POST /api/timeback/assessments/:attemptId/progress` - Record mastery progress
279
+ - `POST /api/timeback/assessments/:attemptId/save` - Checkpoint an in-progress attempt
280
+ - `POST /api/timeback/assessments/:attemptId/submit-item` - Score a single item
281
+ - `POST /api/timeback/assessments/:attemptId/submit` - Submit an attempt
282
+ - `POST /api/timeback/assessments/:attemptId/finalize` - Record XP and publish completion
283
+
284
+ **Student Data:**
285
+
286
+ - `GET /api/timeback/user` - Get the current user's TimeBack data
287
+ - `GET /api/timeback/user/enrollments` - Get the current user's enrollments
288
+ - `GET /api/timeback/user/:timebackId` - Get a student's TimeBack data
289
+ - `GET /api/timeback/student-xp/:timebackId` - Get a student's XP
290
+ - `GET /api/timeback/student-mastery/:timebackId` - Get a student's mastery
291
+ - `GET /api/timeback/student-highest-grade-mastered/:timebackId` - Get a student's highest grade mastered
292
+
293
+ These use the same api-core handlers as the production platform, ensuring consistency. The student data routes return mock data when TimeBack runs in mock mode.
274
294
 
275
295
  When properly configured, your game can call `client.timeback.endActivity()` during local development and see real events appear in your TimeBack dashboard.
276
296