@timeback/qti 0.1.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.
Files changed (57) hide show
  1. package/README.md +32 -0
  2. package/dist/client.d.ts +70 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/constants.d.ts +24 -0
  5. package/dist/constants.d.ts.map +1 -0
  6. package/dist/errors.js +1405 -0
  7. package/dist/factory.d.ts +46 -0
  8. package/dist/factory.d.ts.map +1 -0
  9. package/dist/index.d.ts +48 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +1868 -0
  12. package/dist/lib/index.d.ts +10 -0
  13. package/dist/lib/index.d.ts.map +1 -0
  14. package/dist/lib/pagination.d.ts +27 -0
  15. package/dist/lib/pagination.d.ts.map +1 -0
  16. package/dist/lib/resolve.d.ts +21 -0
  17. package/dist/lib/resolve.d.ts.map +1 -0
  18. package/dist/lib/transport.d.ts +39 -0
  19. package/dist/lib/transport.d.ts.map +1 -0
  20. package/dist/resources/assessment-items.d.ts +87 -0
  21. package/dist/resources/assessment-items.d.ts.map +1 -0
  22. package/dist/resources/assessment-tests.d.ts +225 -0
  23. package/dist/resources/assessment-tests.d.ts.map +1 -0
  24. package/dist/resources/general.d.ts +26 -0
  25. package/dist/resources/general.d.ts.map +1 -0
  26. package/dist/resources/index.d.ts +10 -0
  27. package/dist/resources/index.d.ts.map +1 -0
  28. package/dist/resources/lesson.d.ts +38 -0
  29. package/dist/resources/lesson.d.ts.map +1 -0
  30. package/dist/resources/stimuli.d.ts +64 -0
  31. package/dist/resources/stimuli.d.ts.map +1 -0
  32. package/dist/resources/validate.d.ts +31 -0
  33. package/dist/resources/validate.d.ts.map +1 -0
  34. package/dist/types/api.d.ts +37 -0
  35. package/dist/types/api.d.ts.map +1 -0
  36. package/dist/types/assessment-items.d.ts +82 -0
  37. package/dist/types/assessment-items.d.ts.map +1 -0
  38. package/dist/types/assessment-tests.d.ts +180 -0
  39. package/dist/types/assessment-tests.d.ts.map +1 -0
  40. package/dist/types/base.d.ts +195 -0
  41. package/dist/types/base.d.ts.map +1 -0
  42. package/dist/types/client.d.ts +44 -0
  43. package/dist/types/client.d.ts.map +1 -0
  44. package/dist/types/index.d.ts +14 -0
  45. package/dist/types/index.d.ts.map +1 -0
  46. package/dist/types/lesson.d.ts +38 -0
  47. package/dist/types/lesson.d.ts.map +1 -0
  48. package/dist/types/stimuli.d.ts +56 -0
  49. package/dist/types/stimuli.d.ts.map +1 -0
  50. package/dist/types/validate.d.ts +39 -0
  51. package/dist/types/validate.d.ts.map +1 -0
  52. package/dist/types.d.ts +10 -0
  53. package/dist/types.d.ts.map +1 -0
  54. package/dist/types.js +0 -0
  55. package/dist/utils.d.ts +11 -0
  56. package/dist/utils.d.ts.map +1 -0
  57. package/package.json +39 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Internal Library Exports
3
+ *
4
+ * @internal
5
+ */
6
+ export { Paginator } from './pagination';
7
+ export { resolveToProvider } from './resolve';
8
+ export { Transport } from './transport';
9
+ export type { ResolvedConfig } from '@timeback/internal-client-infra';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,YAAY,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Pagination Utilities
3
+ *
4
+ * Re-exports the common Paginator with QTI-specific configuration.
5
+ */
6
+ import { Paginator as BasePaginator } from '@timeback/internal-client-infra';
7
+ import type { ListParams } from '@timeback/internal-client-infra';
8
+ import type { QtiTransportLike } from '../types';
9
+ /**
10
+ * QTI-specific Paginator that uses page-based pagination.
11
+ *
12
+ * QTI APIs use `page` and `limit` params (1-indexed pages) instead of
13
+ * `offset` and `limit`. The base Paginator handles this via `paginationStyle: 'page'`.
14
+ *
15
+ * @typeParam T - The type of items being paginated
16
+ */
17
+ export declare class Paginator<T> extends BasePaginator<T> {
18
+ /**
19
+ * Create a new QTI Paginator.
20
+ *
21
+ * @param transport - QTI transport instance
22
+ * @param path - API endpoint path
23
+ * @param params - List parameters including optional max
24
+ */
25
+ constructor(transport: QtiTransportLike, path: string, params?: ListParams);
26
+ }
27
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/lib/pagination.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAI5E,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,iCAAiC,CAAA;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAqChD;;;;;;;GAOG;AACH,qBAAa,SAAS,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC;IACjD;;;;;;OAMG;IACH,YAAY,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAE,UAAe,EAe7E;CACD"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Provider Resolution
3
+ *
4
+ * QTI-specific wrapper around the generic provider resolver.
5
+ *
6
+ * @internal
7
+ */
8
+ import type { ProviderRegistry } from '@timeback/internal-client-infra';
9
+ import type { QtiClientConfig, QtiResolvedProvider } from '../types';
10
+ /**
11
+ * Resolve QTI client config to a TimebackProvider.
12
+ *
13
+ * @param config - Client configuration
14
+ * @param registry - Provider registry for platform/env resolution
15
+ * @returns Resolved provider or transport
16
+ * @throws {Error} If configuration is invalid or incomplete
17
+ *
18
+ * @internal
19
+ */
20
+ export declare function resolveToProvider(config: QtiClientConfig, registry?: ProviderRegistry): QtiResolvedProvider;
21
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/lib/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEpE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,eAAe,EACvB,QAAQ,GAAE,gBAA4C,GACpD,mBAAmB,CAMrB"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Transport Layer
3
+ *
4
+ * HTTP transport for QTI API communication.
5
+ */
6
+ import { BaseTransport } from '@timeback/internal-client-infra';
7
+ import type { BaseTransportConfig, PaginatedResponse, RequestOptions } from '@timeback/internal-client-infra';
8
+ /**
9
+ * Configuration for QTI transport.
10
+ */
11
+ type QtiTransportConfig = BaseTransportConfig;
12
+ /**
13
+ * HTTP transport layer for QTI API communication.
14
+ *
15
+ * Uses body-based pagination with page/limit params.
16
+ */
17
+ export declare class Transport extends BaseTransport {
18
+ constructor(config: QtiTransportConfig);
19
+ /**
20
+ * Make a paginated request using body-based pagination.
21
+ *
22
+ * QTI APIs return pagination metadata in the response body:
23
+ * - `items`: Array of items
24
+ * - `total`: Total items across all pages
25
+ * - `pages`: Total number of pages
26
+ * - `page`: Current page (1-indexed)
27
+ * - `limit`: Items per page
28
+ * - `sort`: Sort field
29
+ * - `order`: Sort order
30
+ *
31
+ * @template T - Expected item type in the response
32
+ * @param path - API endpoint path
33
+ * @param options - Request options
34
+ * @returns Normalized paginated response for Paginator compatibility
35
+ */
36
+ requestPaginated<T>(path: string, options?: RequestOptions): Promise<PaginatedResponse<T>>;
37
+ }
38
+ export {};
39
+ //# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/lib/transport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAI/D,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,MAAM,iCAAiC,CAAA;AAGxC;;GAEG;AACH,KAAK,kBAAkB,GAAG,mBAAmB,CAAA;AAE7C;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,aAAa;IAC3C,YAAY,MAAM,EAAE,kBAAkB,EAErC;IAED;;;;;;;;;;;;;;;;OAgBG;IACG,gBAAgB,CAAC,CAAC,EACvB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAY/B;CACD"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Assessment Items Resource
3
+ *
4
+ * CRUD operations for QTI assessment items.
5
+ */
6
+ import { Paginator } from '../lib';
7
+ import type { ListParams } from '@timeback/internal-client-infra';
8
+ import type { Transport } from '../lib/transport';
9
+ import type { AssessmentItem, CreateAssessmentItemRequest, DeleteResponse, ListAssessmentItemsParams, ListResponse, ProcessResponseRequest, ProcessResponseResult, UpdateAssessmentItemRequest } from '../types';
10
+ /**
11
+ * Assessment items resource for managing QTI assessment items.
12
+ *
13
+ * Provides methods to list, get, create, update, delete items,
14
+ * and process responses.
15
+ */
16
+ export declare class AssessmentItemsResource {
17
+ private readonly transport;
18
+ constructor(transport: Transport);
19
+ /**
20
+ * List assessment items with pagination.
21
+ *
22
+ * @param params - Pagination and filter parameters
23
+ * @returns Paginated list of assessment items
24
+ */
25
+ list(params?: ListAssessmentItemsParams): Promise<ListResponse<AssessmentItem>>;
26
+ /**
27
+ * Stream assessment items with automatic pagination.
28
+ *
29
+ * QTI list endpoints use page-based pagination; this returns a Paginator
30
+ * that converts to the correct `page`/`limit` params.
31
+ *
32
+ * @param params - Optional pagination params (offset/limit) + max cap
33
+ * @returns Paginator for async iteration
34
+ */
35
+ stream(params?: ListParams & {
36
+ max?: number;
37
+ }): Paginator<AssessmentItem>;
38
+ /**
39
+ * Get a single assessment item by identifier.
40
+ *
41
+ * @param identifier - Assessment item identifier
42
+ * @returns The assessment item
43
+ */
44
+ get(identifier: string): Promise<AssessmentItem>;
45
+ /**
46
+ * Create a new assessment item.
47
+ *
48
+ * @param body - Assessment item data
49
+ * @returns The created assessment item
50
+ */
51
+ create(body: CreateAssessmentItemRequest): Promise<AssessmentItem>;
52
+ /**
53
+ * Update an assessment item.
54
+ *
55
+ * @param identifier - Assessment item identifier
56
+ * @param body - Updated assessment item data
57
+ * @returns The updated assessment item
58
+ */
59
+ update(identifier: string, body: UpdateAssessmentItemRequest): Promise<AssessmentItem>;
60
+ /**
61
+ * Delete an assessment item.
62
+ *
63
+ * @param identifier - Assessment item identifier
64
+ * @returns Delete response
65
+ */
66
+ delete(identifier: string): Promise<DeleteResponse>;
67
+ /**
68
+ * Process a response for an assessment item.
69
+ *
70
+ * Validates and scores the response against the item's correct answer.
71
+ *
72
+ * @param identifier - Assessment item identifier
73
+ * @param body - Response to process
74
+ * @returns Score and feedback
75
+ */
76
+ processResponse(identifier: string, body: Omit<ProcessResponseRequest, 'identifier'>): Promise<ProcessResponseResult>;
77
+ /**
78
+ * Create an assessment item from metadata.
79
+ *
80
+ * Alternative creation endpoint that accepts metadata-focused input.
81
+ *
82
+ * @param body - Assessment item metadata
83
+ * @returns The created assessment item
84
+ */
85
+ createFromMetadata(body: CreateAssessmentItemRequest): Promise<AssessmentItem>;
86
+ }
87
+ //# sourceMappingURL=assessment-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment-items.d.ts","sourceRoot":"","sources":["../../src/resources/assessment-items.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,KAAK,EAAE,UAAU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@ -0,0 +1,225 @@
1
+ /**
2
+ * Assessment Tests Resource
3
+ *
4
+ * CRUD operations for QTI assessment tests including nested test parts,
5
+ * sections, and items.
6
+ */
7
+ import { Paginator } from '../lib';
8
+ import type { Transport } from '../lib/transport';
9
+ import type { AddItemRequest, AssessmentSection, AssessmentTest, CreateAssessmentTestRequest, CreateSectionRequest, CreateTestPartRequest, DeleteResponse, ListAssessmentTestsParams, ListResponse, ListSectionsParams, ListTestPartsParams, QuestionsResponse, ReorderItemsRequest, TestPart, UpdateAssessmentTestRequest, UpdateSectionRequest, UpdateTestMetadataRequest, UpdateTestPartRequest } from '../types';
10
+ import type { ListParams } from '@timeback/internal-client-infra';
11
+ /**
12
+ * Helper for managing items within a section.
13
+ */
14
+ declare class SectionItemsHelper {
15
+ private readonly transport;
16
+ private readonly testId;
17
+ private readonly testPartId;
18
+ private readonly sectionId;
19
+ constructor(transport: Transport, testId: string, testPartId: string, sectionId: string);
20
+ /**
21
+ * Add an item to the section.
22
+ *
23
+ * @param body - Item reference data
24
+ * @returns The updated section
25
+ */
26
+ add(body: AddItemRequest): Promise<AssessmentSection>;
27
+ /**
28
+ * Remove an item from the section.
29
+ *
30
+ * @param itemIdentifier - Item identifier to remove
31
+ * @returns Delete response
32
+ */
33
+ remove(itemIdentifier: string): Promise<DeleteResponse>;
34
+ /**
35
+ * Reorder items in the section.
36
+ *
37
+ * @param body - New item order
38
+ * @returns The updated section
39
+ */
40
+ reorder(body: ReorderItemsRequest): Promise<AssessmentSection>;
41
+ }
42
+ /**
43
+ * Helper for managing sections within a test part.
44
+ */
45
+ declare class TestPartSectionsHelper {
46
+ private readonly transport;
47
+ private readonly testId;
48
+ private readonly testPartId;
49
+ constructor(transport: Transport, testId: string, testPartId: string);
50
+ /**
51
+ * List sections in a test part.
52
+ *
53
+ * @param params - Pagination parameters
54
+ * @returns Paginated list of sections
55
+ */
56
+ list(params?: ListSectionsParams): Promise<ListResponse<AssessmentSection>>;
57
+ /**
58
+ * Get a section by identifier.
59
+ *
60
+ * @param identifier - Section identifier
61
+ * @returns The section
62
+ */
63
+ get(identifier: string): Promise<AssessmentSection>;
64
+ /**
65
+ * Create a new section.
66
+ *
67
+ * @param body - Section data
68
+ * @returns The created section
69
+ */
70
+ create(body: CreateSectionRequest): Promise<AssessmentSection>;
71
+ /**
72
+ * Update a section.
73
+ *
74
+ * @param identifier - Section identifier
75
+ * @param body - Updated section data
76
+ * @returns The updated section
77
+ */
78
+ update(identifier: string, body: UpdateSectionRequest): Promise<AssessmentSection>;
79
+ /**
80
+ * Delete a section.
81
+ *
82
+ * @param identifier - Section identifier
83
+ * @returns Delete response
84
+ */
85
+ delete(identifier: string): Promise<DeleteResponse>;
86
+ /**
87
+ * Get items helper for a specific section.
88
+ *
89
+ * @param sectionId - Section identifier
90
+ * @returns Items helper
91
+ */
92
+ items(sectionId: string): SectionItemsHelper;
93
+ }
94
+ /**
95
+ * Helper for managing test parts within an assessment test.
96
+ */
97
+ declare class AssessmentTestPartsHelper {
98
+ private readonly transport;
99
+ private readonly testId;
100
+ constructor(transport: Transport, testId: string);
101
+ /**
102
+ * List test parts.
103
+ *
104
+ * @param params - Pagination parameters
105
+ * @returns Paginated list of test parts
106
+ */
107
+ list(params?: ListTestPartsParams): Promise<ListResponse<TestPart>>;
108
+ /**
109
+ * Get a test part by identifier.
110
+ *
111
+ * @param identifier - Test part identifier
112
+ * @returns The test part
113
+ */
114
+ get(identifier: string): Promise<TestPart>;
115
+ /**
116
+ * Create a new test part.
117
+ *
118
+ * @param body - Test part data
119
+ * @returns The created test part
120
+ */
121
+ create(body: CreateTestPartRequest): Promise<TestPart>;
122
+ /**
123
+ * Update a test part.
124
+ *
125
+ * @param identifier - Test part identifier
126
+ * @param body - Updated test part data
127
+ * @returns The updated test part
128
+ */
129
+ update(identifier: string, body: UpdateTestPartRequest): Promise<TestPart>;
130
+ /**
131
+ * Delete a test part.
132
+ *
133
+ * @param identifier - Test part identifier
134
+ * @returns Delete response
135
+ */
136
+ delete(identifier: string): Promise<DeleteResponse>;
137
+ /**
138
+ * Get sections helper for a specific test part.
139
+ *
140
+ * @param testPartId - Test part identifier
141
+ * @returns Sections helper
142
+ */
143
+ sections(testPartId: string): TestPartSectionsHelper;
144
+ }
145
+ /**
146
+ * Assessment tests resource for managing QTI assessment tests.
147
+ *
148
+ * Provides methods to list, get, create, update, delete tests,
149
+ * and access nested test parts, sections, and items.
150
+ */
151
+ export declare class AssessmentTestsResource {
152
+ private readonly transport;
153
+ constructor(transport: Transport);
154
+ /**
155
+ * List assessment tests with pagination.
156
+ *
157
+ * @param params - Pagination and filter parameters
158
+ * @returns Paginated list of assessment tests
159
+ */
160
+ list(params?: ListAssessmentTestsParams): Promise<ListResponse<AssessmentTest>>;
161
+ /**
162
+ * Stream assessment tests with automatic pagination.
163
+ *
164
+ * @param params - Optional pagination params (offset/limit) + max cap
165
+ * @returns Paginator for async iteration
166
+ */
167
+ stream(params?: ListParams & {
168
+ max?: number;
169
+ }): Paginator<AssessmentTest>;
170
+ /**
171
+ * Get a single assessment test by identifier.
172
+ *
173
+ * @param identifier - Assessment test identifier
174
+ * @returns The assessment test
175
+ */
176
+ get(identifier: string): Promise<AssessmentTest>;
177
+ /**
178
+ * Create a new assessment test.
179
+ *
180
+ * @param body - Assessment test data
181
+ * @returns The created assessment test
182
+ */
183
+ create(body: CreateAssessmentTestRequest): Promise<AssessmentTest>;
184
+ /**
185
+ * Update an assessment test.
186
+ *
187
+ * @param identifier - Assessment test identifier
188
+ * @param body - Updated assessment test data
189
+ * @returns The updated assessment test
190
+ */
191
+ update(identifier: string, body: UpdateAssessmentTestRequest): Promise<AssessmentTest>;
192
+ /**
193
+ * Delete an assessment test.
194
+ *
195
+ * @param identifier - Assessment test identifier
196
+ * @returns Delete response
197
+ */
198
+ delete(identifier: string): Promise<DeleteResponse>;
199
+ /**
200
+ * Update test metadata.
201
+ *
202
+ * @param identifier - Assessment test identifier
203
+ * @param body - Metadata to update
204
+ * @returns The updated assessment test
205
+ */
206
+ updateMetadata(identifier: string, body: UpdateTestMetadataRequest): Promise<AssessmentTest>;
207
+ /**
208
+ * Get all questions from an assessment test.
209
+ *
210
+ * Returns the full item details for each question referenced in the test.
211
+ *
212
+ * @param identifier - Assessment test identifier
213
+ * @returns Questions with their full item details
214
+ */
215
+ getQuestions(identifier: string): Promise<QuestionsResponse>;
216
+ /**
217
+ * Get test parts helper for a specific test.
218
+ *
219
+ * @param testId - Assessment test identifier
220
+ * @returns Test parts helper
221
+ */
222
+ testParts(testId: string): AssessmentTestPartsHelper;
223
+ }
224
+ export {};
225
+ //# sourceMappingURL=assessment-tests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment-tests.d.ts","sourceRoot":"","sources":["../../src/resources/assessment-tests.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EACX,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAMjE;;GAEG;AACH,cAAM,kBAAkB;IAEtB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJ3B,YACkB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,SAAS,E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2B,GAAG,OAAO,CAAC,cAAc,CAAC,CAQrF;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAOlD;IAED;;;;;;OAMG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,cAAc,CAAC,CAQ3F;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAI3D;IAED;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,yBAAyB,CAEnD;CACD"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * General Resource
3
+ *
4
+ * General QTI endpoints that don't fit into other resources.
5
+ */
6
+ import type { Transport } from '../lib/transport';
7
+ import type { DeleteResponse } from '../types';
8
+ /**
9
+ * General resource for miscellaneous QTI operations.
10
+ *
11
+ * Provides methods for general operations like delete-by-id.
12
+ */
13
+ export declare class GeneralResource {
14
+ private readonly transport;
15
+ constructor(transport: Transport);
16
+ /**
17
+ * Delete any entity by its ID.
18
+ *
19
+ * This is a general delete endpoint that can remove any QTI entity.
20
+ *
21
+ * @param id - Entity identifier
22
+ * @returns Delete confirmation message
23
+ */
24
+ deleteById(id: string): Promise<DeleteResponse>;
25
+ }
26
+ //# sourceMappingURL=general.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../src/resources/general.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;GAIG;AACH,qBAAa,eAAe;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,SAAS,EAAI;IAErD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAI9C;CACD"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * QTI Resources
3
+ */
4
+ export { AssessmentItemsResource } from './assessment-items';
5
+ export { AssessmentTestsResource } from './assessment-tests';
6
+ export { GeneralResource } from './general';
7
+ export { LessonResource } from './lesson';
8
+ export { StimuliResource } from './stimuli';
9
+ export { ValidateResource } from './validate';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Lesson Resource
3
+ *
4
+ * Lesson and question feedback endpoints.
5
+ */
6
+ import type { Transport } from '../lib/transport';
7
+ import type { LessonFeedback, SubmitLessonRequest, SubmitQuestionRequest } from '../types';
8
+ /**
9
+ * Lesson resource for managing lesson and question feedback.
10
+ *
11
+ * Provides methods to submit and retrieve lesson/question feedback.
12
+ */
13
+ export declare class LessonResource {
14
+ private readonly transport;
15
+ constructor(transport: Transport);
16
+ /**
17
+ * Submit lesson feedback.
18
+ *
19
+ * @param body - Lesson feedback data
20
+ * @returns The created feedback
21
+ */
22
+ submitLesson(body: SubmitLessonRequest): Promise<LessonFeedback>;
23
+ /**
24
+ * Get lesson feedback by lesson ID.
25
+ *
26
+ * @param lessonId - Lesson identifier
27
+ * @returns The lesson feedback
28
+ */
29
+ getLesson(lessonId: string): Promise<LessonFeedback>;
30
+ /**
31
+ * Submit question feedback.
32
+ *
33
+ * @param body - Question feedback data
34
+ * @returns The created feedback
35
+ */
36
+ submitQuestion(body: SubmitQuestionRequest): Promise<LessonFeedback>;
37
+ }
38
+ //# sourceMappingURL=lesson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lesson.d.ts","sourceRoot":"","sources":["../../src/resources/lesson.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EACX,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,MAAM,UAAU,CAAA;AAEjB;;;;GAIG;AACH,qBAAa,cAAc;IACd,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,SAAS,EAAI;IAErD;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,cAAc,CAAC,CAK/D;IAED;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAInD;IAED;;;;;OAKG;IACH,cAAc,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CAKnE;CACD"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Stimuli Resource
3
+ *
4
+ * CRUD operations for QTI stimuli.
5
+ */
6
+ import { Paginator } from '../lib';
7
+ import type { Transport } from '../lib/transport';
8
+ import type { CreateStimulusRequest, DeleteResponse, ListResponse, ListStimuliParams, Stimulus, UpdateStimulusRequest } from '../types';
9
+ import type { ListParams } from '@timeback/internal-client-infra';
10
+ /**
11
+ * Stimuli resource for managing QTI stimulus materials.
12
+ *
13
+ * Provides methods to list, get, create, update, and delete stimuli.
14
+ */
15
+ export declare class StimuliResource {
16
+ private readonly transport;
17
+ constructor(transport: Transport);
18
+ /**
19
+ * List stimuli with pagination.
20
+ *
21
+ * @param params - Pagination and filter parameters
22
+ * @returns Paginated list of stimuli
23
+ */
24
+ list(params?: ListStimuliParams): Promise<ListResponse<Stimulus>>;
25
+ /**
26
+ * Stream stimuli with automatic pagination.
27
+ *
28
+ * @param params - Optional pagination params (offset/limit) + max cap
29
+ * @returns Paginator for async iteration
30
+ */
31
+ stream(params?: ListParams & {
32
+ max?: number;
33
+ }): Paginator<Stimulus>;
34
+ /**
35
+ * Get a single stimulus by identifier.
36
+ *
37
+ * @param identifier - Stimulus identifier
38
+ * @returns The stimulus
39
+ */
40
+ get(identifier: string): Promise<Stimulus>;
41
+ /**
42
+ * Create a new stimulus.
43
+ *
44
+ * @param body - Stimulus data
45
+ * @returns The created stimulus
46
+ */
47
+ create(body: CreateStimulusRequest): Promise<Stimulus>;
48
+ /**
49
+ * Update a stimulus.
50
+ *
51
+ * @param identifier - Stimulus identifier
52
+ * @param body - Updated stimulus data
53
+ * @returns The updated stimulus
54
+ */
55
+ update(identifier: string, body: UpdateStimulusRequest): Promise<Stimulus>;
56
+ /**
57
+ * Delete a stimulus.
58
+ *
59
+ * @param identifier - Stimulus identifier
60
+ * @returns Delete response
61
+ */
62
+ delete(identifier: string): Promise<DeleteResponse>;
63
+ }
64
+ //# sourceMappingURL=stimuli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stimuli.d.ts","sourceRoot":"","sources":["../../src/resources/stimuli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,EACrB,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE;;;;GAIG;AACH,qBAAa,eAAe;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,SAAS,EAAI;IAErD;;;;;OAKG;IACH,IAAI,CAAC,MAAM,GAAE,iBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAWpE;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,GAAE,UAAU,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,CAEtE;IAED;;;;;OAKG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEzC;IAED;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAKrD;IAED;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAKzE;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAOlD;CACD"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Validate Resource
3
+ *
4
+ * QTI XML validation endpoints.
5
+ */
6
+ import type { Transport } from '../lib/transport';
7
+ import type { BatchValidationResult, ValidateBatchRequest, ValidateRequest, ValidationResult } from '../types';
8
+ /**
9
+ * Validation resource for checking QTI XML validity.
10
+ *
11
+ * Provides methods to validate single items or batch validate multiple items.
12
+ */
13
+ export declare class ValidateResource {
14
+ private readonly transport;
15
+ constructor(transport: Transport);
16
+ /**
17
+ * Validate a single QTI XML document.
18
+ *
19
+ * @param body - Validation request with XML and schema type
20
+ * @returns Validation result
21
+ */
22
+ validate(body: ValidateRequest): Promise<ValidationResult>;
23
+ /**
24
+ * Validate multiple QTI XML documents in batch.
25
+ *
26
+ * @param body - Batch validation request
27
+ * @returns Batch validation results
28
+ */
29
+ batch(body: ValidateBatchRequest): Promise<BatchValidationResult>;
30
+ }
31
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/resources/validate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EACX,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,MAAM,UAAU,CAAA;AAEjB;;;;GAIG;AACH,qBAAa,gBAAgB;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,SAAS,EAAI;IAErD;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAKzD;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAKhE;CACD"}