@timeback/qti 0.3.1-beta.20260424210132 → 0.3.1

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/dist/index.d.ts CHANGED
@@ -1694,15 +1694,10 @@ declare class AssessmentItemsResource {
1694
1694
  /**
1695
1695
  * Update an assessment item.
1696
1696
  *
1697
- * `rawXml` and `content` are intentionally required. The QTI server's JSON
1698
- * update path is currently unstable for XML-backed items (it crashes with
1699
- * `reading 'type'` even when given a full PUT body copied from `get()`),
1700
- * so callers must replay the existing XML state rather than submitting a
1701
- * simplified JSON payload from the docs. See the "Upsert" and
1702
- * "CRUD operations > should reject updating XML-created assessment items"
1703
- * cases in `assessment-items.e2e.test.ts` for the reproduction. Once the
1704
- * server accepts JSON-only updates reliably, these fields will be relaxed
1705
- * to optional in a follow-up release.
1697
+ * The QTI server's JSON update path regenerates `rawXml` and `content` from
1698
+ * structured item data when `interaction` is supplied. XML-created items may
1699
+ * still fail if callers replay a `get()` response that does not include the
1700
+ * original JSON interaction shape.
1706
1701
  *
1707
1702
  * @param identifier - Assessment item identifier
1708
1703
  * @param body - Updated assessment item data
@@ -1715,13 +1710,10 @@ declare class AssessmentItemsResource {
1715
1710
  * Attempts an update; if the item doesn't exist (404), creates it
1716
1711
  * using the JSON create format.
1717
1712
  *
1718
- * Like {@link update}, the update path still requires `rawXml` and
1719
- * `content` because the QTI server's JSON update path is unstable for
1720
- * XML-backed items. The create fallback (on 404) drops `rawXml`/`content`
1721
- * before calling {@link create}, so a JSON-shaped create payload with
1722
- * placeholders for those fields is accepted for new items today but will
1723
- * fail update until the server stabilizes. See the `.skip`ped upsert
1724
- * cases in `assessment-items.e2e.test.ts` for the current server state.
1713
+ * This supports structured JSON item bodies such as
1714
+ * `interaction.questionStructure`, which the QTI server accepts and converts
1715
+ * to XML. Existing XML-created items may still need to be updated via XML
1716
+ * unless the caller can provide the structured `interaction` body.
1725
1717
  *
1726
1718
  * @param identifier - Assessment item identifier
1727
1719
  * @param body - Assessment item data
package/dist/index.js CHANGED
@@ -1887,8 +1887,8 @@ var QtiAssessmentItemUpdateInput = z11.object({
1887
1887
  feedbackBlock: z11.array(QtiFeedbackBlock).optional(),
1888
1888
  rubrics: z11.array(QtiRubric).optional(),
1889
1889
  stimulus: QtiStimulusReference.optional(),
1890
- rawXml: z11.string(),
1891
- content: z11.record(z11.string(), z11.unknown())
1890
+ rawXml: z11.string().optional(),
1891
+ content: z11.record(z11.string(), z11.unknown()).optional()
1892
1892
  }).strict();
1893
1893
  var QtiAssessmentItemProcessResponseInput = z11.object({
1894
1894
  identifier: NonEmptyString,
@@ -52,15 +52,10 @@ export declare class AssessmentItemsResource {
52
52
  /**
53
53
  * Update an assessment item.
54
54
  *
55
- * `rawXml` and `content` are intentionally required. The QTI server's JSON
56
- * update path is currently unstable for XML-backed items (it crashes with
57
- * `reading 'type'` even when given a full PUT body copied from `get()`),
58
- * so callers must replay the existing XML state rather than submitting a
59
- * simplified JSON payload from the docs. See the "Upsert" and
60
- * "CRUD operations > should reject updating XML-created assessment items"
61
- * cases in `assessment-items.e2e.test.ts` for the reproduction. Once the
62
- * server accepts JSON-only updates reliably, these fields will be relaxed
63
- * to optional in a follow-up release.
55
+ * The QTI server's JSON update path regenerates `rawXml` and `content` from
56
+ * structured item data when `interaction` is supplied. XML-created items may
57
+ * still fail if callers replay a `get()` response that does not include the
58
+ * original JSON interaction shape.
64
59
  *
65
60
  * @param identifier - Assessment item identifier
66
61
  * @param body - Updated assessment item data
@@ -73,13 +68,10 @@ export declare class AssessmentItemsResource {
73
68
  * Attempts an update; if the item doesn't exist (404), creates it
74
69
  * using the JSON create format.
75
70
  *
76
- * Like {@link update}, the update path still requires `rawXml` and
77
- * `content` because the QTI server's JSON update path is unstable for
78
- * XML-backed items. The create fallback (on 404) drops `rawXml`/`content`
79
- * before calling {@link create}, so a JSON-shaped create payload with
80
- * placeholders for those fields is accepted for new items today but will
81
- * fail update until the server stabilizes. See the `.skip`ped upsert
82
- * cases in `assessment-items.e2e.test.ts` for the current server state.
71
+ * This supports structured JSON item bodies such as
72
+ * `interaction.questionStructure`, which the QTI server accepts and converts
73
+ * to XML. Existing XML-created items may still need to be updated via XML
74
+ * unless the caller can provide the structured `interaction` body.
83
75
  *
84
76
  * @param identifier - Assessment item identifier
85
77
  * @param body - Assessment item data
@@ -1 +1 @@
1
- {"version":3,"file":"assessment-items.d.ts","sourceRoot":"","sources":["../../src/resources/assessment-items.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EACX,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,sBAAsB,EACtB,2BAA2B,EAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,MAAM,UAAU,CAAA;AAEjB;;;;;GAKG;AACH,qBAAa,uBAAuB;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,gBAAgB,EAAI;IAE5D;;;;;OAKG;IACH,IAAI,CAAC,MAAM,GAAE,yBAA8B,GAAG,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAalF;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,GAAE,UAAU,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,cAAc,CAAC,CAG5E;IAED;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAK/C;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAMjE;IAED;;;;;;;;;;;;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G;IACH,IAAI,CAAC,MAAM,GAAE,yBAA8B,GAAG,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAalF;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,GAAE,UAAU,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,cAAc,CAAC,CAG5E;IAED;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAK/C;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAMjE;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAcrF;IAED;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAc3F;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAQlD;IAED;;;;;;;;OAQG;IACH,eAAe,CACd,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CAUhC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,aAAa,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,cAAc,CAAC,CAM3E;IAED;;;;;;;;OAQG;IACH,kBAAkB,CAAC,IAAI,EAAE,+BAA+B,GAAG,OAAO,CAAC,cAAc,CAAC,CAMjF;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timeback/qti",
3
- "version": "0.3.1-beta.20260424210132",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -35,7 +35,7 @@
35
35
  "test:e2e": "vitest run --config vitest.e2e.config.ts"
36
36
  },
37
37
  "dependencies": {
38
- "@timeback/types": "0.3.0",
38
+ "@timeback/types": "0.3.1",
39
39
  "zod": "^4.2.1"
40
40
  },
41
41
  "devDependencies": {