@crimson-education/sdk 0.3.13 → 0.3.14

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.
@@ -22,11 +22,9 @@ const normalizeTask = (raw) => {
22
22
  throw new Error("Task object missing required 'id' field");
23
23
  }
24
24
  const statusUpper = typeof raw.status === "string" ? raw.status.toUpperCase() : undefined;
25
- const isComplete = raw.isComplete !== undefined
26
- ? Boolean(raw.isComplete)
27
- : statusUpper
28
- ? statusUpper === "DONE"
29
- : Boolean(raw.finishedAt);
25
+ // Use status as the source of truth for completion.
26
+ // Keep isComplete for backward compatibility with existing consumers.
27
+ const isComplete = statusUpper === "DONE";
30
28
  return {
31
29
  id: (_a = raw.id) !== null && _a !== void 0 ? _a : "",
32
30
  name: (_c = (_b = raw.name) !== null && _b !== void 0 ? _b : raw.description) !== null && _c !== void 0 ? _c : "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimson-education/sdk",
3
- "version": "0.3.13",
3
+ "version": "0.3.14",
4
4
  "description": "Crimson SDK for accessing Crimson App APIs",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",