@citolab/tspci 2.6.3-beta.0 → 2.6.5

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/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.6.5](/compare/v2.6.3-beta.3...v2.6.5) (2025-04-16)
7
+
8
+ **Note:** Version bump only for package @citolab/tspci
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.6.3-beta.3](/compare/v2.6.3-beta.2...v2.6.3-beta.3) (2025-04-16)
15
+
16
+ **Note:** Version bump only for package @citolab/tspci
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.6.3-beta.2](/compare/v2.6.3-beta.1...v2.6.3-beta.2) (2025-04-16)
23
+
24
+ **Note:** Version bump only for package @citolab/tspci
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.6.3-beta.1](/compare/v2.6.3-beta.0...v2.6.3-beta.1) (2025-04-14)
31
+
32
+ **Note:** Version bump only for package @citolab/tspci
33
+
34
+
35
+
36
+
37
+
6
38
  ## [2.6.3-beta.0](/compare/v2.6.2...v2.6.3-beta.0) (2025-04-14)
7
39
 
8
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.6.3-beta.0",
3
+ "version": "2.6.5",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -51,5 +51,5 @@
51
51
  "resolutions": {
52
52
  "chokidar": "^4.0.0"
53
53
  },
54
- "gitHead": "ff7ff2668a565e76002b9cc79414d1e70fe61924"
54
+ "gitHead": "06a99429f9555a99fe3f877fb55c4bcbb9282b8a"
55
55
  }
package/types/index.d.ts CHANGED
@@ -75,14 +75,8 @@ export interface InputResponseFormat<T> {
75
75
  export interface Calculate {
76
76
  calculate: () => ResponseType;
77
77
  }
78
- export declare type QtiVariableJSON = {
79
- [K in "list" | "base"]?: {
80
- [Ka in "boolean" | "integer" | "float" | "string" | "pair" | "directedPair" | "identifier"]?: ResponseType;
81
- };
82
- };
83
78
  export declare type float = number;
84
79
  export declare type integer = number;
85
- export declare type ResponseType = boolean | directedPair | float | integer | string | ResponseType[];
86
80
  export declare enum BaseType {
87
81
  boolean = "boolean",
88
82
  directedPair = "directedPair",
@@ -97,3 +91,82 @@ export declare enum Cardinality {
97
91
  ordered = "ordered",
98
92
  single = "single",
99
93
  }
94
+
95
+ // Individual type definitions for different QTI data types
96
+
97
+ // File type representation
98
+ export type QtiFileData = {
99
+ data: string;
100
+ mime: string;
101
+ name?: string;
102
+ };
103
+
104
+ // Possible base types
105
+ export type QtiBaseBoolean = boolean;
106
+ export type QtiBaseInteger = number;
107
+ export type QtiBaseFloat = number;
108
+ export type QtiBaseString = string;
109
+ export type QtiBasePoint = [number, number];
110
+ export type QtiBasePair = [string, string];
111
+ export type QtiBaseDirectedPair = [string, string];
112
+ export type QtiBaseDuration = string; // ISO 8601 duration format
113
+ export type QtiBaseFile = QtiFileData;
114
+ export type QtiBaseUri = string;
115
+ export type QtiBaseIntOrIdentifier = number | string;
116
+ export type QtiBaseIdentifier = string;
117
+
118
+ // Union of all possible response types for base and list
119
+ export type ResponseType =
120
+ boolean |
121
+ number |
122
+ string |
123
+ QtiBasePair |
124
+ QtiBasePoint |
125
+ QtiFileData |
126
+ Array<boolean | number | string | QtiBasePair | QtiBasePoint | QtiFileData>;
127
+
128
+ // Record item type
129
+ export type QtiRecordItem = {
130
+ name: string;
131
+ base?: QtiBaseTypeJSON | null;
132
+ list?: QtiListTypeJSON | null;
133
+ };
134
+
135
+ // Base type JSON representation
136
+ export type QtiBaseTypeJSON = {
137
+ boolean?: QtiBaseBoolean;
138
+ integer?: QtiBaseInteger;
139
+ float?: QtiBaseFloat;
140
+ string?: QtiBaseString;
141
+ point?: QtiBasePoint;
142
+ pair?: QtiBasePair;
143
+ directedPair?: QtiBaseDirectedPair;
144
+ duration?: QtiBaseDuration;
145
+ file?: QtiBaseFile;
146
+ uri?: QtiBaseUri;
147
+ intOrIdentifier?: QtiBaseIntOrIdentifier;
148
+ identifier?: QtiBaseIdentifier;
149
+ } | null;
150
+
151
+ // List type JSON representation
152
+ export type QtiListTypeJSON = {
153
+ boolean?: QtiBaseBoolean[];
154
+ integer?: QtiBaseInteger[];
155
+ float?: QtiBaseFloat[];
156
+ string?: QtiBaseString[];
157
+ point?: QtiBasePoint[];
158
+ pair?: QtiBasePair[];
159
+ directedPair?: QtiBaseDirectedPair[];
160
+ duration?: QtiBaseDuration[];
161
+ file?: QtiBaseFile[];
162
+ uri?: QtiBaseUri[];
163
+ intOrIdentifier?: QtiBaseIntOrIdentifier[];
164
+ identifier?: QtiBaseIdentifier[];
165
+ } | null;
166
+
167
+ // Complete QTI Variable JSON type
168
+ export declare type QtiVariableJSON = {
169
+ base?: QtiBaseTypeJSON;
170
+ list?: QtiListTypeJSON;
171
+ record?: QtiRecordItem[] | null;
172
+ };