@timeback/powerpath 0.1.3 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,21 +1,1211 @@
1
+ import * as _timeback_internal_client_infra from '@timeback/internal-client-infra';
2
+ import { PowerPathPaths, RequestOptions, PaginatedResponse, ClientConfig, TransportOnlyConfig, ProviderClientConfig, BaseTransportConfig, Paginator as Paginator$1, ListParams, ProviderRegistry, TimebackProvider, AuthCheckResult, BaseTransport } from '@timeback/internal-client-infra';
3
+ export { AuthCheckResult, EnvAuth, Environment, ExplicitAuth, ListParams, PageResult } from '@timeback/internal-client-infra';
4
+
1
5
  /**
2
- * PowerPath API client SDK for Timeback.
6
+ * PowerPath Base Types
7
+ *
8
+ * Common types and enums for PowerPath API responses.
9
+ */
10
+
11
+ // ═══════════════════════════════════════════════════════════════════════════════
12
+ // ENUMS
13
+ // ═══════════════════════════════════════════════════════════════════════════════
14
+
15
+ /**
16
+ * Test assignment status values.
17
+ */
18
+ type TestAssignmentStatus =
19
+ | 'assigned'
20
+ | 'in_progress'
21
+ | 'completed'
22
+ | 'failed'
23
+ | 'expired'
24
+ | 'cancelled'
25
+
26
+ /**
27
+ * Lesson types for PowerPath assessments.
28
+ */
29
+ type PowerPathLessonType = 'powerpath-100' | 'quiz' | 'test-out' | 'placement' | 'unit-test'
30
+
31
+ /**
32
+ * Question difficulty levels.
33
+ */
34
+ type PowerPathQuestionDifficulty = 'easy' | 'medium' | 'hard'
35
+
36
+ // ═══════════════════════════════════════════════════════════════════════════════
37
+ // PAGINATION
38
+ // ═══════════════════════════════════════════════════════════════════════════════
39
+
40
+ /**
41
+ * Pagination metadata from PowerPath list responses.
42
+ */
43
+ interface PaginationMeta {
44
+ /** Total items across all pages */
45
+ totalCount: number
46
+ /** Total number of pages */
47
+ pageCount: number
48
+ /** Current page number (1-indexed) */
49
+ pageNumber: number
50
+ /**
51
+ * Offset for the next page of results.
52
+ *
53
+ * This API uses offset pagination: request `offset` is the number of items to skip.
54
+ * List responses also include an `offset` field; treat it as the server-provided
55
+ * next offset (and fall back to `currentOffset + limit` when implementing iterators).
56
+ */
57
+ offset: number
58
+ /** Items per page (default 100, max 3000) */
59
+ limit: number
60
+ }
61
+
62
+ /**
63
+ * PowerPath Response Types
64
+ *
65
+ * Entity types returned by PowerPath API endpoints.
66
+ */
67
+
68
+
69
+
70
+ // ═══════════════════════════════════════════════════════════════════════════════
71
+ // TEST ASSIGNMENTS
72
+ // ═══════════════════════════════════════════════════════════════════════════════
73
+
74
+ /**
75
+ * A single test assignment entity.
76
+ */
77
+ interface TestAssignment {
78
+ sourcedId: string
79
+ studentSourcedId: string
80
+ studentEmail: string
81
+ assignedByUserSourcedId?: string
82
+ subject: string
83
+ grade: string
84
+ assignmentStatus: TestAssignmentStatus
85
+ testName?: string
86
+ assignedAt?: string
87
+ expiresAt?: string
88
+ completedAt?: string
89
+ resourceSourcedId?: string
90
+ componentResourceSourcedId?: string
91
+ }
92
+
93
+ /**
94
+ * List response for test assignments.
95
+ */
96
+ interface TestAssignmentsListResponse extends PaginationMeta {
97
+ testAssignments: TestAssignment[]
98
+ }
99
+
100
+ /**
101
+ * Result from creating a test assignment.
102
+ */
103
+ interface AssignmentResult {
104
+ assignmentId: string
105
+ lessonId: string
106
+ resourceId: string
107
+ }
108
+
109
+ /**
110
+ * Result from bulk operations.
111
+ */
112
+ interface BulkResult {
113
+ success: boolean
114
+ results: AssignmentResult[]
115
+ errors: Array<{ row: number; message: string }>
116
+ }
117
+
118
+ // ═══════════════════════════════════════════════════════════════════════════════
119
+ // QUESTIONS
120
+ // ═══════════════════════════════════════════════════════════════════════════════
121
+
122
+ /**
123
+ * QTI content associated with a question.
124
+ */
125
+ interface PowerPathQuestionContent {
126
+ /** The type of the question (e.g., choiceInteraction) */
127
+ type?: string
128
+ /** The raw XML question in QTI format */
129
+ rawXml: string
130
+ }
131
+
132
+ /**
133
+ * Result of evaluating a student's response to a question.
134
+ */
135
+ interface PowerPathQuestionResult {
136
+ /** Score assigned considering the student's response */
137
+ score: number
138
+ /** Feedback text for the question */
139
+ feedback: string
140
+ /** Outcome variables from response processing */
141
+ outcomes?: Record<string, string>
142
+ }
143
+
144
+ /**
145
+ * A question in a PowerPath test.
146
+ *
147
+ * Represents a question with its metadata, optional QTI content,
148
+ * and (when answered) the student's response and result.
149
+ */
150
+ interface PowerPathTestQuestion {
151
+ /** ID that represents the question in the test */
152
+ id: string
153
+ /** Index of the question in the test */
154
+ index: number
155
+ /** Title of the question */
156
+ title: string
157
+ /** URL of the QTI question */
158
+ url: string
159
+ /** Difficulty of the question */
160
+ difficulty: PowerPathQuestionDifficulty
161
+ /** Whether the question has been approved by a human */
162
+ humanApproved?: boolean | null
163
+ /** QTI content of the question */
164
+ content?: PowerPathQuestionContent
165
+ /** Student's response (single value or array) */
166
+ response?: string | string[]
167
+ /** Student's responses keyed by response identifier */
168
+ responses?: Record<string, string | string[]>
169
+ /** Whether the student's response is correct */
170
+ correct?: boolean
171
+ /** Result of evaluating the response */
172
+ result?: PowerPathQuestionResult
173
+ /** sourcedId of the AssessmentResult for this question attempt */
174
+ resultId?: string
175
+ /** Learning objective IDs associated with the question */
176
+ learningObjectives?: string[]
177
+ }
178
+
179
+ // ═══════════════════════════════════════════════════════════════════════════════
180
+ // ASSESSMENTS
181
+ // ═══════════════════════════════════════════════════════════════════════════════
182
+
183
+ /**
184
+ * Result from creating an external test (test-out, placement, or internal).
185
+ */
186
+ interface ExternalTestCreateResponse {
187
+ lessonId: string
188
+ resourceId: string
189
+ }
190
+
191
+ /**
192
+ * A single attempt record.
193
+ */
194
+ interface Attempt {
195
+ attempt?: number
196
+ score: number
197
+ scoreStatus: string
198
+ }
199
+
200
+ /**
201
+ * Result from creating a new attempt.
202
+ */
203
+ interface CreateAttemptResponse {
204
+ attempt: Attempt
205
+ }
206
+
207
+ /**
208
+ * Result from getting attempts for a lesson.
209
+ */
210
+ interface GetAttemptsResponse {
211
+ attempts: Attempt[]
212
+ }
213
+
214
+ /**
215
+ * Result from resetting an attempt.
216
+ */
217
+ interface ResetAttemptResponse {
218
+ success: boolean
219
+ score: number
220
+ }
221
+
222
+ // ═══════════════════════════════════════════════════════════════════════════════
223
+ // ASSESSMENT PROGRESS (getAssessmentProgress)
224
+ // ═══════════════════════════════════════════════════════════════════════════════
225
+
226
+ /**
227
+ * Progress for a PowerPath 100 lesson.
228
+ *
229
+ * Uses `seenQuestions` (not `questions`) and includes remaining question counts
230
+ * per difficulty level.
231
+ */
232
+ interface PowerPath100ProgressResponse {
233
+ lessonType: 'powerpath-100'
234
+ /** Remaining question counts per difficulty level */
235
+ remainingQuestionsPerDifficulty: {
236
+ easy: number
237
+ medium: number
238
+ hard: number
239
+ }
240
+ /** Current score for this attempt */
241
+ score: number
242
+ /** Questions the student has seen */
243
+ seenQuestions: PowerPathTestQuestion[]
244
+ /** sourcedId of the parent test AssessmentResult */
245
+ testResultId?: string
246
+ /** Attempt number */
247
+ attempt: number
248
+ /** XP earned in the lesson */
249
+ xp: number | null
250
+ /** Multiplier for XP */
251
+ multiplier: number | null
252
+ /** Accuracy of the student's attempted questions */
253
+ accuracy: number
254
+ /** Number of correct questions answered */
255
+ correctQuestions: number
256
+ /** Total number of questions in the lesson */
257
+ totalQuestions: number
258
+ }
259
+
260
+ /**
261
+ * Progress for quiz, test-out, placement, or unit-test lessons.
262
+ *
263
+ * Uses `questions` (not `seenQuestions`). Includes `finalized` to indicate
264
+ * whether the lesson has been completed.
265
+ */
266
+ interface StandardProgressResponse {
267
+ lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
268
+ /** Whether the lesson has been finalized in the current attempt */
269
+ finalized: boolean
270
+ /** Current score for this attempt */
271
+ score?: number
272
+ /** Questions in the test */
273
+ questions: PowerPathTestQuestion[]
274
+ /** Tool provider of the lesson if external */
275
+ toolProvider: string | null
276
+ /** Whether auto-enrollment failed (only for finalized external tests) */
277
+ enrollmentFailed?: boolean
278
+ /** sourcedId of the parent test AssessmentResult */
279
+ testResultId?: string
280
+ /** Attempt number */
281
+ attempt: number
282
+ /** XP earned in the lesson */
283
+ xp: number | null
284
+ /** Multiplier for XP */
285
+ multiplier: number | null
286
+ /** Accuracy of the student's attempted questions */
287
+ accuracy: number
288
+ /** Number of correct questions answered */
289
+ correctQuestions: number
290
+ /** Total number of questions in the lesson */
291
+ totalQuestions: number
292
+ }
293
+
294
+ /**
295
+ * Result from getting assessment progress.
296
+ *
297
+ * Discriminated union on `lessonType`:
298
+ * - `'powerpath-100'` — uses `seenQuestions` and `remainingQuestionsPerDifficulty`
299
+ * - `'quiz' | 'test-out' | 'placement' | 'unit-test'` — uses `questions` and `finalized`
300
+ */
301
+ type GetAssessmentProgressResponse = PowerPath100ProgressResponse | StandardProgressResponse
302
+
303
+ // ═══════════════════════════════════════════════════════════════════════════════
304
+ // GET NEXT QUESTION (getNextQuestion)
305
+ // ═══════════════════════════════════════════════════════════════════════════════
306
+
307
+ /**
308
+ * Result from getting the next question in a PowerPath 100 lesson.
309
+ */
310
+ interface GetNextQuestionResponse {
311
+ /** Current PowerPath score of the student in this lesson */
312
+ score: number
313
+ /** The next question to present */
314
+ question: PowerPathTestQuestion
315
+ }
316
+
317
+ // ═══════════════════════════════════════════════════════════════════════════════
318
+ // UPDATE STUDENT QUESTION RESPONSE (updateStudentQuestionResponse)
319
+ // ═══════════════════════════════════════════════════════════════════════════════
320
+
321
+ /**
322
+ * Response feedback for a student's answer.
323
+ */
324
+ interface ResponseResultFeedback {
325
+ identifier?: string
326
+ value?: string
327
+ }
328
+
329
+ /**
330
+ * Result of processing a student's response.
331
+ */
332
+ interface ResponseResult {
333
+ /** Whether the student's response is correct */
334
+ isCorrect: boolean
335
+ /** Score for this specific response (0 or 1) */
336
+ score: number
337
+ /** Optional feedback */
338
+ feedback?: ResponseResultFeedback
339
+ }
340
+
341
+ /**
342
+ * Result from updating a student's response in a PowerPath 100 lesson.
343
+ *
344
+ * Includes the updated PowerPath score, response correctness, and accuracy stats.
345
+ */
346
+ interface PowerPath100UpdateResponseResult {
347
+ lessonType: 'powerpath-100'
348
+ /** Updated PowerPath score */
349
+ powerpathScore: number
350
+ /** Result of processing the response */
351
+ responseResult: ResponseResult
352
+ /** Assessment result for the question (for debugging) */
353
+ questionResult?: unknown
354
+ /** Assessment result for the test (for debugging) */
355
+ testResult?: unknown
356
+ /** Accuracy of the student's attempted questions */
357
+ accuracy: number
358
+ /** Number of correct questions answered */
359
+ correctQuestions: number
360
+ /** Total number of questions */
361
+ totalQuestions: number
362
+ /** XP earned */
363
+ xp: number | null
364
+ /** XP multiplier */
365
+ multiplier: number | null
366
+ }
367
+
368
+ /**
369
+ * Result from updating a student's response in a quiz/test-out/placement/unit-test lesson.
370
+ *
371
+ * Minimal response — correctness is evaluated at finalization.
372
+ */
373
+ interface StandardUpdateResponseResult {
374
+ lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
375
+ /** Assessment result for the question (for debugging) */
376
+ questionResult?: unknown
377
+ }
378
+
379
+ /**
380
+ * Result from updating a student question response.
381
+ *
382
+ * Discriminated union on `lessonType`:
383
+ * - `'powerpath-100'` — includes score, accuracy, and response correctness
384
+ * - Other lesson types — minimal, evaluated at finalization
385
+ */
386
+ type UpdateStudentQuestionResponseResult =
387
+ | PowerPath100UpdateResponseResult
388
+ | StandardUpdateResponseResult
389
+
390
+ // ═══════════════════════════════════════════════════════════════════════════════
391
+ // FINALIZE ASSESSMENT (finalStudentAssessmentResponse)
392
+ // ═══════════════════════════════════════════════════════════════════════════════
393
+
394
+ /**
395
+ * Result from finalizing a test assessment.
396
+ *
397
+ * Returned after all questions have been answered and the lesson is
398
+ * evaluated. Not applicable to `powerpath-100` or external test lessons.
399
+ */
400
+ interface FinalizeAssessmentResponse {
401
+ /** Type of the lesson that was finalized */
402
+ lessonType: PowerPathLessonType
403
+ /** Whether the lesson has been finalized */
404
+ finalized: boolean
405
+ /** The attempt number */
406
+ attempt: number
407
+ }
408
+
409
+ // ═══════════════════════════════════════════════════════════════════════════════
410
+ // TEST OUT (testOut)
411
+ // ═══════════════════════════════════════════════════════════════════════════════
412
+
413
+ /**
414
+ * Result from getting the test-out lesson for a student/course.
415
+ *
416
+ * Returns the test-out lesson reference, finalization status,
417
+ * and optional external tool credentials.
418
+ */
419
+ interface TestOutResponse {
420
+ lessonType: 'test-out'
421
+ /** ID of the test-out lesson, or null if none exists */
422
+ lessonId: string | null
423
+ /** Whether the test-out has been finalized in the current attempt */
424
+ finalized: boolean
425
+ /** Tool provider for the test-out lesson, or null if internal */
426
+ toolProvider: string | null
427
+ /** Attempt number */
428
+ attempt?: number
429
+ /** Credentials for accessing the assigned test on external tool */
430
+ credentials?: {
431
+ email: string
432
+ password: string
433
+ }
434
+ /** Assignment ID on external tool for results retrieval */
435
+ assignmentId?: string
436
+ /** Class ID on external tool for results retrieval */
437
+ classId?: string
438
+ /** URL of the test on external tool */
439
+ testUrl?: string
440
+ /** ID of the test on external tool */
441
+ testId?: string
442
+ }
443
+
444
+ // ═══════════════════════════════════════════════════════════════════════════════
445
+ // IMPORT EXTERNAL RESULTS (importExternalTestAssignmentResults)
446
+ // ═══════════════════════════════════════════════════════════════════════════════
447
+
448
+ /**
449
+ * Result from importing external test assignment results.
450
+ *
451
+ * Response shape varies by tool provider. Contains at minimum a success indicator.
452
+ */
453
+ interface ImportExternalResultsResponse {
454
+ [key: string]: unknown
455
+ }
456
+
457
+ // ═══════════════════════════════════════════════════════════════════════════════
458
+ // PLACEMENT
459
+ // ═══════════════════════════════════════════════════════════════════════════════
460
+
461
+ /**
462
+ * Result from getting all placement tests.
463
+ */
464
+ interface GetAllPlacementTestsResponse {
465
+ placementTests: unknown[]
466
+ }
467
+
468
+ /**
469
+ * Result from getting current placement level.
470
+ */
471
+ interface GetCurrentLevelResponse {
472
+ gradeLevel?: unknown
473
+ onboarded?: boolean
474
+ availableTests: number
475
+ }
476
+
477
+ /**
478
+ * Result from getting the next placement test.
479
+ */
480
+ interface GetNextPlacementTestResponse {
481
+ availableTests: number
482
+ lesson: string
483
+ }
484
+
485
+ /**
486
+ * Result from getting subject progress.
487
+ */
488
+ interface GetSubjectProgressResponse {
489
+ progress: unknown[]
490
+ }
491
+
492
+ /**
493
+ * Result from resetting placement.
494
+ */
495
+ interface ResetPlacementResponse {
496
+ success: boolean
497
+ placementResultsDeleted: number
498
+ onboardingReset: boolean
499
+ }
500
+
501
+ // ═══════════════════════════════════════════════════════════════════════════════
502
+ // SCREENING
503
+ // ═══════════════════════════════════════════════════════════════════════════════
504
+
505
+ /**
506
+ * Result from screening getResults.
507
+ * Response shape depends on MAP integration configuration.
508
+ */
509
+ interface ScreeningResultsResponse {
510
+ [key: string]: unknown
511
+ }
512
+
513
+ /**
514
+ * Result from screening getSession.
515
+ * Response shape depends on MAP integration configuration.
516
+ */
517
+ interface ScreeningSessionResponse {
518
+ [key: string]: unknown
519
+ }
520
+
521
+ /**
522
+ * Result from resetting a screening session.
523
+ */
524
+ interface ScreeningResetSessionResponse {
525
+ success?: boolean
526
+ [key: string]: unknown
527
+ }
528
+
529
+ /**
530
+ * Result from assigning a screening test.
531
+ */
532
+ interface ScreeningAssignTestResponse {
533
+ success?: boolean
534
+ [key: string]: unknown
535
+ }
536
+
537
+ // ═══════════════════════════════════════════════════════════════════════════════
538
+ // LESSON PLANS
539
+ // ═══════════════════════════════════════════════════════════════════════════════
540
+
541
+ /**
542
+ * Result from creating a lesson plan.
543
+ */
544
+ interface LessonPlanCreateResponse {
545
+ lessonPlanId: string
546
+ }
547
+
548
+ /**
549
+ * A lesson plan operation record.
550
+ */
551
+ interface LessonPlanOperation {
552
+ id: string
553
+ type: string
554
+ payload?: unknown
555
+ reason?: string
556
+ createdAt: string
557
+ sequenceNumber: number
558
+ createdBy?: string
559
+ }
560
+
561
+ /**
562
+ * Response containing lesson plan operations.
563
+ */
564
+ interface LessonPlanOperationsResponse {
565
+ operations: LessonPlanOperation[]
566
+ }
567
+
568
+ /**
569
+ * Result from a single lesson plan operation.
570
+ */
571
+ interface LessonPlanOperationResult {
572
+ success: boolean
573
+ message?: string
574
+ operationId?: string
575
+ }
576
+
577
+ /**
578
+ * Result from syncing lesson plan operations.
579
+ */
580
+ interface LessonPlanSyncResult {
581
+ success: boolean
582
+ message?: string
583
+ operationCount: number
584
+ operationResults: Array<{ success: boolean; errors?: Array<{ message: string }> }>
585
+ }
586
+
587
+ /**
588
+ * Result from syncing a course.
589
+ */
590
+ interface LessonPlanCourseSyncResult {
591
+ lessonPlansAffected: string[]
592
+ }
593
+
594
+ /**
595
+ * Response containing a lesson plan.
596
+ */
597
+ interface LessonPlanResponse {
598
+ lessonPlan: Record<string, unknown>
599
+ }
600
+
601
+ /**
602
+ * Response containing course progress.
603
+ */
604
+ interface CourseProgressResponse {
605
+ lineItems: Record<string, unknown>[]
606
+ }
607
+
608
+ /**
609
+ * Result from updating student item response.
610
+ */
611
+ interface UpdateStudentItemResponseResult {
612
+ success?: boolean
613
+ [key: string]: unknown
614
+ }
615
+
616
+ // ═══════════════════════════════════════════════════════════════════════════════
617
+ // SYLLABUS
618
+ // ═══════════════════════════════════════════════════════════════════════════════
619
+
620
+ /**
621
+ * Response containing syllabus data.
622
+ */
623
+ interface SyllabusResponse {
624
+ syllabus?: unknown
625
+ }
626
+
627
+ type input<T> = T extends {
628
+ _zod: {
629
+ input: any;
630
+ };
631
+ } ? T["_zod"]["input"] : unknown;
632
+
633
+ /**
634
+ * PowerPath Schemas
635
+ *
636
+ * Zod schemas for the PowerPath adaptive learning API.
637
+ */
638
+
639
+
640
+
641
+ declare const ExternalTestOut = ExternalTestBase.extend({
642
+ lessonType: z.literal('test-out'),
643
+ xp: z.number(),
644
+ })
645
+
646
+ declare const ExternalPlacement = ExternalTestBase.extend({
647
+ lessonType: z.literal('placement'),
648
+ courseIdOnFail: NonEmptyString.optional(),
649
+ xp: z.number().optional(),
650
+ })
651
+
652
+ declare const PowerPathCreateExternalPlacementTestInput = ExternalPlacement
653
+
654
+ declare const PowerPathCreateExternalTestOutInput = ExternalTestOut
655
+
656
+ declare const PowerPathCreateInternalTestInput = z.union([
657
+ InternalTestBase.extend({
658
+ testType: z.literal('qti'),
659
+ qti: z.object({
660
+ url: z.url(),
661
+ title: NonEmptyString.optional(),
662
+ metadata: z.record(z.string(), z.unknown()).optional(),
663
+ }),
664
+ }),
665
+ InternalTestBase.extend({
666
+ testType: z.literal('assessment-bank'),
667
+ assessmentBank: z.object({
668
+ resources: z.array(
669
+ z.object({
670
+ url: z.url(),
671
+ title: NonEmptyString.optional(),
672
+ metadata: z.record(z.string(), z.unknown()).optional(),
673
+ }),
674
+ ),
675
+ }),
676
+ }),
677
+ ])
678
+
679
+ declare const PowerPathCreateNewAttemptInput = z.object({
680
+ student: NonEmptyString,
681
+ lesson: NonEmptyString,
682
+ })
683
+
684
+ declare const PowerPathFinalStudentAssessmentResponseInput = z.object({
685
+ student: NonEmptyString,
686
+ lesson: NonEmptyString,
687
+ })
688
+
689
+ declare const PowerPathLessonPlansCreateInput = z.object({
690
+ courseId: NonEmptyString,
691
+ userId: NonEmptyString,
692
+ classId: NonEmptyString.optional(),
693
+ })
694
+
695
+ declare const PowerPathLessonPlanOperationInput = z.union([
696
+ z.object({
697
+ type: z.literal('set-skipped'),
698
+ payload: z.object({
699
+ target: LessonPlanTarget,
700
+ value: z.boolean(),
701
+ }),
702
+ }),
703
+ z.object({
704
+ type: z.literal('add-custom-resource'),
705
+ payload: z.object({
706
+ resource_id: NonEmptyString,
707
+ parent_component_id: NonEmptyString,
708
+ skipped: z.boolean().optional(),
709
+ }),
710
+ }),
711
+ z.object({
712
+ type: z.literal('move-item-before'),
713
+ payload: z.object({
714
+ target: LessonPlanTarget,
715
+ reference_id: NonEmptyString,
716
+ }),
717
+ }),
718
+ z.object({
719
+ type: z.literal('move-item-after'),
720
+ payload: z.object({
721
+ target: LessonPlanTarget,
722
+ reference_id: NonEmptyString,
723
+ }),
724
+ }),
725
+ z.object({
726
+ type: z.literal('move-item-to-start'),
727
+ payload: z.object({
728
+ target: LessonPlanTarget,
729
+ }),
730
+ }),
731
+ z.object({
732
+ type: z.literal('move-item-to-end'),
733
+ payload: z.object({
734
+ target: LessonPlanTarget,
735
+ }),
736
+ }),
737
+ z.object({
738
+ type: z.literal('change-item-parent'),
739
+ payload: z.object({
740
+ target: LessonPlanTarget,
741
+ new_parent_id: NonEmptyString,
742
+ position: z.enum(['start', 'end']).optional(),
743
+ }),
744
+ }),
745
+ ])
746
+
747
+ declare const PowerPathLessonPlanOperationsInput = z.object({
748
+ operation: z.array(PowerPathLessonPlanOperationInput),
749
+ reason: NonEmptyString.optional(),
750
+ })
751
+
752
+ declare const PowerPathLessonPlanUpdateStudentItemResponseInput = z.object({
753
+ studentId: NonEmptyString,
754
+ componentResourceId: NonEmptyString,
755
+ result: z.object({
756
+ status: z.enum(['active', 'tobedeleted']),
757
+ metadata: z.record(z.string(), z.unknown()).optional(),
758
+ score: z.number().optional(),
759
+ textScore: NonEmptyString.optional(),
760
+ scoreDate: NonEmptyString,
761
+ scorePercentile: z.number().optional(),
762
+ scoreStatus: ScoreStatus,
763
+ comment: NonEmptyString.optional(),
764
+ learningObjectiveSet: z
765
+ .array(
766
+ z.object({
767
+ source: NonEmptyString,
768
+ learningObjectiveResults: z.array(
769
+ z.object({
770
+ learningObjectiveId: NonEmptyString,
771
+ score: z.number().optional(),
772
+ textScore: NonEmptyString.optional(),
773
+ }),
774
+ ),
775
+ }),
776
+ )
777
+ .optional(),
778
+ inProgress: NonEmptyString.optional(),
779
+ incomplete: NonEmptyString.optional(),
780
+ late: NonEmptyString.optional(),
781
+ missing: NonEmptyString.optional(),
782
+ }),
783
+ })
784
+
785
+ declare const PowerPathMakeExternalTestAssignmentInput = z.object({
786
+ student: NonEmptyString,
787
+ lesson: NonEmptyString,
788
+ applicationName: NonEmptyString.optional(),
789
+ testId: NonEmptyString.optional(),
790
+ skipCourseEnrollment: z.boolean().optional(),
791
+ })
792
+
793
+ declare const PowerPathPlacementResetUserPlacementInput = z.object({
794
+ student: NonEmptyString,
795
+ subject: TimebackSubject,
796
+ })
797
+
798
+ declare const PowerPathResetAttemptInput = z.object({
799
+ student: NonEmptyString,
800
+ lesson: NonEmptyString,
801
+ })
802
+
803
+ declare const PowerPathScreeningResetSessionInput = z.object({
804
+ userId: NonEmptyString,
805
+ })
806
+
807
+ declare const PowerPathScreeningAssignTestInput = z.object({
808
+ userId: NonEmptyString,
809
+ subject: z.enum(['Math', 'Reading', 'Language', 'Science']),
810
+ })
811
+
812
+ declare const PowerPathTestAssignmentsCreateInput = z.object({
813
+ student: NonEmptyString,
814
+ subject: TimebackSubject,
815
+ grade: TimebackGrade,
816
+ testName: NonEmptyString.optional(),
817
+ })
818
+
819
+ declare const PowerPathTestAssignmentsUpdateInput = z.object({
820
+ testName: NonEmptyString,
821
+ })
822
+
823
+ declare const PowerPathTestAssignmentsBulkInput = z.object({
824
+ items: z.array(PowerPathTestAssignmentItemInput),
825
+ })
826
+
827
+ declare const PowerPathTestAssignmentsImportInput = z.object({
828
+ spreadsheetUrl: z.url(),
829
+ sheet: NonEmptyString,
830
+ })
831
+
832
+ declare const PowerPathTestAssignmentsListParams = z.object({
833
+ student: NonEmptyString,
834
+ status: z
835
+ .enum(['assigned', 'in_progress', 'completed', 'failed', 'expired', 'cancelled'])
836
+ .optional(),
837
+ subject: NonEmptyString.optional(),
838
+ grade: TimebackGrade.optional(),
839
+ limit: z.number().int().positive().max(3000).optional(),
840
+ offset: z.number().int().nonnegative().optional(),
841
+ })
842
+
843
+ declare const PowerPathTestAssignmentsAdminParams = z.object({
844
+ student: NonEmptyString.optional(),
845
+ status: z
846
+ .enum(['assigned', 'in_progress', 'completed', 'failed', 'expired', 'cancelled'])
847
+ .optional(),
848
+ subject: NonEmptyString.optional(),
849
+ grade: TimebackGrade.optional(),
850
+ limit: z.number().int().positive().max(3000).optional(),
851
+ offset: z.number().int().nonnegative().optional(),
852
+ })
853
+
854
+ declare const PowerPathUpdateStudentQuestionResponseInput = z.object({
855
+ student: NonEmptyString,
856
+ question: NonEmptyString,
857
+ response: z.union([NonEmptyString, z.array(NonEmptyString)]).optional(),
858
+ responses: z.record(z.string(), z.union([NonEmptyString, z.array(NonEmptyString)])).optional(),
859
+ lesson: NonEmptyString,
860
+ })
861
+
862
+ declare const PowerPathGetAssessmentProgressParams = z.object({
863
+ student: NonEmptyString,
864
+ lesson: NonEmptyString,
865
+ attempt: z.number().int().positive().optional(),
866
+ })
867
+
868
+ declare const PowerPathGetNextQuestionParams = z.object({
869
+ student: NonEmptyString,
870
+ lesson: NonEmptyString,
871
+ })
872
+
873
+ declare const PowerPathGetAttemptsParams = z.object({
874
+ student: NonEmptyString,
875
+ lesson: NonEmptyString,
876
+ })
877
+
878
+ declare const PowerPathTestOutParams = z.object({
879
+ student: NonEmptyString,
880
+ lesson: NonEmptyString.optional(),
881
+ finalized: z.boolean().optional(),
882
+ toolProvider: NonEmptyString.optional(),
883
+ attempt: z.number().int().positive().optional(),
884
+ })
885
+
886
+ declare const PowerPathImportExternalTestAssignmentResultsParams = z.object({
887
+ student: NonEmptyString,
888
+ lesson: NonEmptyString,
889
+ applicationName: NonEmptyString.optional(),
890
+ })
891
+
892
+ declare const PowerPathPlacementQueryParams = z.object({
893
+ student: NonEmptyString,
894
+ subject: TimebackSubject,
895
+ })
896
+
897
+ declare const PowerPathSyllabusQueryParams = z.object({
898
+ status: z.enum(['active', 'tobedeleted']).optional(),
899
+ })
900
+
901
+ // ═══════════════════════════════════════════════════════════════════════════════
902
+ // TYPE EXPORTS (REQUEST INPUTS)
903
+ // ═══════════════════════════════════════════════════════════════════════════════
904
+
905
+ // Shorter type aliases (like OneRoster pattern: schema = OneRosterFoo, type = Foo)
906
+ type CreateExternalPlacementTestInput = input<
907
+ typeof PowerPathCreateExternalPlacementTestInput
908
+ >
909
+ type CreateExternalTestOutInput = input<typeof PowerPathCreateExternalTestOutInput>
910
+ type CreateInternalTestInput = input<typeof PowerPathCreateInternalTestInput>
911
+ type CreateNewAttemptInput = input<typeof PowerPathCreateNewAttemptInput>
912
+ type FinalStudentAssessmentResponseInput = input<
913
+ typeof PowerPathFinalStudentAssessmentResponseInput
914
+ >
915
+ type LessonPlansCreateInput = input<typeof PowerPathLessonPlansCreateInput>
916
+ type LessonPlanOperationInput = input<typeof PowerPathLessonPlanOperationInput>
917
+ type LessonPlanOperationsInput = input<typeof PowerPathLessonPlanOperationsInput>
918
+ type LessonPlanUpdateStudentItemResponseInput = input<
919
+ typeof PowerPathLessonPlanUpdateStudentItemResponseInput
920
+ >
921
+ type MakeExternalTestAssignmentInput = input<
922
+ typeof PowerPathMakeExternalTestAssignmentInput
923
+ >
924
+ type PlacementResetUserPlacementInput = input<
925
+ typeof PowerPathPlacementResetUserPlacementInput
926
+ >
927
+ type ResetAttemptInput = input<typeof PowerPathResetAttemptInput>
928
+ type ScreeningResetSessionInput = input<typeof PowerPathScreeningResetSessionInput>
929
+ type ScreeningAssignTestInput = input<typeof PowerPathScreeningAssignTestInput>
930
+ type TestAssignmentsCreateInput = input<typeof PowerPathTestAssignmentsCreateInput>
931
+ type TestAssignmentsUpdateInput = input<typeof PowerPathTestAssignmentsUpdateInput>
932
+ type TestAssignmentsBulkInput = input<typeof PowerPathTestAssignmentsBulkInput>
933
+ type TestAssignmentsImportInput = input<typeof PowerPathTestAssignmentsImportInput>
934
+ type TestAssignmentsListParams = input<typeof PowerPathTestAssignmentsListParams>
935
+ type TestAssignmentsAdminParams = input<typeof PowerPathTestAssignmentsAdminParams>
936
+ type UpdateStudentQuestionResponseInput = input<
937
+ typeof PowerPathUpdateStudentQuestionResponseInput
938
+ >
939
+ type GetAssessmentProgressParams = input<typeof PowerPathGetAssessmentProgressParams>
940
+ type GetNextQuestionParams = input<typeof PowerPathGetNextQuestionParams>
941
+ type GetAttemptsParams = input<typeof PowerPathGetAttemptsParams>
942
+ type TestOutParams = input<typeof PowerPathTestOutParams>
943
+ type ImportExternalTestAssignmentResultsParams = input<
944
+ typeof PowerPathImportExternalTestAssignmentResultsParams
945
+ >
946
+ type PlacementQueryParams = input<typeof PowerPathPlacementQueryParams>
947
+ type SyllabusQueryParams = input<typeof PowerPathSyllabusQueryParams>
948
+
949
+ /**
950
+ * Transport interface for PowerPath client.
951
+ *
952
+ * Extends base transport requirements with PowerPath-specific paths.
953
+ * Required when using transport mode with PowerPathClient.
954
+ */
955
+ interface PowerPathTransportLike {
956
+ /** Base URL of the API */
957
+ baseUrl: string;
958
+ /** API path profiles for PowerPath operations */
959
+ paths: PowerPathPaths;
960
+ /** Make an authenticated request */
961
+ request<T>(path: string, options?: RequestOptions): Promise<T>;
962
+ /** Make a paginated request (PowerPath returns pagination metadata in body) */
963
+ requestPaginated<T>(path: string, options?: RequestOptions): Promise<PaginatedResponse<T>>;
964
+ }
965
+ /**
966
+ * All supported PowerPath client configuration types.
967
+ *
968
+ * Supports four modes:
969
+ * - **Provider mode**: `{ provider: TimebackProvider }` — pre-built provider with token sharing
970
+ * - **Environment mode**: `{ platform?, env, auth }` — Timeback hosted APIs
971
+ * - **Explicit mode**: `{ baseUrl, auth: { authUrl } }` — custom API URLs
972
+ * - **Transport mode**: `{ transport }` — custom transport with paths
973
+ *
974
+ * The `platform` field (in env mode) selects which Timeback implementation to use:
975
+ * - `'BEYOND_AI'` (default): BeyondAI's Timeback platform
976
+ * - `'LEARNWITH_AI'`: Samy's LearnWith.AI platform
977
+ */
978
+ type PowerPathClientConfig = ClientConfig | TransportOnlyConfig<PowerPathTransportLike> | ProviderClientConfig;
979
+ /**
980
+ * Configuration for PowerPath transport.
981
+ */
982
+ type PowerPathTransportConfig = BaseTransportConfig & {
983
+ /** API path profiles for PowerPath operations */
984
+ paths: PowerPathPaths;
985
+ };
986
+ /**
987
+ * Instance type of PowerPathClient.
988
+ */
989
+ type PowerPathClientInstance = InstanceType<typeof PowerPathClient>;
990
+
991
+ /**
992
+ * Assessment Resource
993
+ *
994
+ * PowerPath assessment operations: tests, attempts, and responses.
995
+ */
996
+
997
+ /**
998
+ * Assessment resource for PowerPath operations.
999
+ */
1000
+ declare class AssessmentResource {
1001
+ private readonly transport;
1002
+ constructor(transport: PowerPathTransportLike);
1003
+ createExternalPlacementTest(input: CreateExternalPlacementTestInput): Promise<ExternalTestCreateResponse>;
1004
+ createExternalTestOut(input: CreateExternalTestOutInput): Promise<ExternalTestCreateResponse>;
1005
+ createInternalTest(input: CreateInternalTestInput): Promise<ExternalTestCreateResponse>;
1006
+ createNewAttempt(input: CreateNewAttemptInput): Promise<CreateAttemptResponse>;
1007
+ finalStudentAssessmentResponse(input: FinalStudentAssessmentResponseInput): Promise<FinalizeAssessmentResponse>;
1008
+ getAssessmentProgress(params: GetAssessmentProgressParams): Promise<GetAssessmentProgressResponse>;
1009
+ getAttempts(params: GetAttemptsParams): Promise<GetAttemptsResponse>;
1010
+ getNextQuestion(params: GetNextQuestionParams): Promise<GetNextQuestionResponse>;
1011
+ importExternalTestAssignmentResults(params: ImportExternalTestAssignmentResultsParams): Promise<ImportExternalResultsResponse>;
1012
+ makeExternalTestAssignment(input: MakeExternalTestAssignmentInput): Promise<ExternalTestCreateResponse>;
1013
+ resetAttempt(input: ResetAttemptInput): Promise<ResetAttemptResponse>;
1014
+ testOut(params: TestOutParams): Promise<TestOutResponse>;
1015
+ updateStudentQuestionResponse(input: UpdateStudentQuestionResponseInput): Promise<UpdateStudentQuestionResponseResult>;
1016
+ }
1017
+
1018
+ /**
1019
+ * Lesson Plans Resource
1020
+ *
1021
+ * PowerPath lesson plan operations and progress tracking.
1022
+ */
1023
+
1024
+ /**
1025
+ * Lesson plans resource for managing course lesson plans and progress.
1026
+ */
1027
+ declare class LessonPlansResource {
1028
+ private readonly transport;
1029
+ constructor(transport: PowerPathTransportLike);
1030
+ create(input: LessonPlansCreateInput): Promise<LessonPlanCreateResponse>;
1031
+ get(courseId: string, userId: string): Promise<LessonPlanResponse>;
1032
+ deleteAll(courseId: string): Promise<void>;
1033
+ listOperations(lessonPlanId: string): Promise<LessonPlanOperationsResponse>;
1034
+ createOperations(lessonPlanId: string, input: LessonPlanOperationsInput): Promise<LessonPlanOperationResult>;
1035
+ sync(lessonPlanId: string): Promise<LessonPlanSyncResult>;
1036
+ syncCourse(courseId: string): Promise<LessonPlanCourseSyncResult>;
1037
+ recreate(lessonPlanId: string): Promise<LessonPlanSyncResult>;
1038
+ getCourseProgress(courseId: string, studentId: string): Promise<CourseProgressResponse>;
1039
+ getTree(lessonPlanId: string): Promise<LessonPlanResponse>;
1040
+ getStructure(lessonPlanId: string): Promise<LessonPlanResponse>;
1041
+ updateStudentItemResponse(input: LessonPlanUpdateStudentItemResponseInput): Promise<UpdateStudentItemResponseResult>;
1042
+ }
1043
+
1044
+ /**
1045
+ * Placement Resource
1046
+ *
1047
+ * PowerPath placement testing operations.
1048
+ */
1049
+
1050
+ /**
1051
+ * Placement resource for PowerPath placement APIs.
1052
+ */
1053
+ declare class PlacementResource {
1054
+ private readonly transport;
1055
+ constructor(transport: PowerPathTransportLike);
1056
+ getPlacement(studentId: string): Promise<Record<string, unknown>>;
1057
+ getAllPlacementTests(params: PlacementQueryParams): Promise<GetAllPlacementTestsResponse>;
1058
+ getCurrentLevel(params: PlacementQueryParams): Promise<GetCurrentLevelResponse>;
1059
+ getNextPlacementTest(params: PlacementQueryParams): Promise<GetNextPlacementTestResponse>;
1060
+ getSubjectProgress(params: PlacementQueryParams): Promise<GetSubjectProgressResponse>;
1061
+ resetUserPlacement(input: PlacementResetUserPlacementInput): Promise<ResetPlacementResponse>;
1062
+ }
1063
+
1064
+ /**
1065
+ * Screening Resource
1066
+ *
1067
+ * PowerPath screening session operations.
1068
+ */
1069
+
1070
+ /**
1071
+ * Screening resource for PowerPath screening APIs.
1072
+ */
1073
+ declare class ScreeningResource {
1074
+ private readonly transport;
1075
+ constructor(transport: PowerPathTransportLike);
1076
+ getResults(userId: string): Promise<ScreeningResultsResponse>;
1077
+ getSession(userId: string): Promise<ScreeningSessionResponse>;
1078
+ resetSession(input: ScreeningResetSessionInput): Promise<ScreeningResetSessionResponse>;
1079
+ assignTest(input: ScreeningAssignTestInput): Promise<ScreeningAssignTestResponse>;
1080
+ }
1081
+
1082
+ /**
1083
+ * Syllabus Resource
1084
+ *
1085
+ * PowerPath syllabus operations.
1086
+ */
1087
+
1088
+ /**
1089
+ * Syllabus resource for PowerPath APIs.
1090
+ */
1091
+ declare class SyllabusResource {
1092
+ private readonly transport;
1093
+ constructor(transport: PowerPathTransportLike);
1094
+ get(courseSourcedId: string, params?: SyllabusQueryParams): Promise<SyllabusResponse>;
1095
+ }
1096
+
1097
+ /**
1098
+ * Pagination Utilities
1099
+ *
1100
+ * Re-exports the common Paginator with PowerPath-specific configuration.
1101
+ */
1102
+
1103
+ /**
1104
+ * PowerPath-specific Paginator that uses the PowerPath transport.
1105
+ *
1106
+ * Accepts params with `max` included for consumer convenience,
1107
+ * then extracts and forwards it to the base Paginator.
1108
+ *
1109
+ * Validates list parameters before making any network requests.
1110
+ */
1111
+ declare class Paginator<T> extends Paginator$1<T, unknown> {
1112
+ constructor(transport: PowerPathTransportLike, path: string, params?: ListParams, unwrapKey?: string, transform?: (item: T) => T);
1113
+ }
1114
+
1115
+ /**
1116
+ * Test Assignments Resource
1117
+ *
1118
+ * PowerPath test assignment operations.
1119
+ */
1120
+
1121
+ type TestAssignmentsStreamParams = TestAssignmentsListParams & {
1122
+ max?: number;
1123
+ };
1124
+ type TestAssignmentsAdminStreamParams = TestAssignmentsAdminParams & {
1125
+ max?: number;
1126
+ };
1127
+ /**
1128
+ * Test assignments resource for PowerPath APIs.
1129
+ */
1130
+ declare class TestAssignmentsResource {
1131
+ private readonly transport;
1132
+ constructor(transport: PowerPathTransportLike);
1133
+ /**
1134
+ * Stream test assignments for a student with lazy pagination.
1135
+ *
1136
+ * Matches the OneRoster client pattern: returns a Paginator (AsyncIterable)
1137
+ * with `toArray()` and `firstPage()` helpers.
1138
+ *
1139
+ * @param params - Query params (student required; supports limit/offset)
1140
+ * @returns Paginator that yields `TestAssignment` items
1141
+ */
1142
+ stream(params: TestAssignmentsStreamParams): Paginator<TestAssignment>;
1143
+ /**
1144
+ * Convenience helper to fetch all test assignments for a student.
1145
+ *
1146
+ * @param params - List params (supports filters + limit/offset)
1147
+ * @returns All matching test assignments
1148
+ */
1149
+ listAll(params: TestAssignmentsStreamParams): Promise<TestAssignment[]>;
1150
+ list(params: TestAssignmentsListParams): Promise<TestAssignmentsListResponse>;
1151
+ create(input: TestAssignmentsCreateInput): Promise<AssignmentResult>;
1152
+ get(id: string): Promise<TestAssignment>;
1153
+ update(id: string, input: TestAssignmentsUpdateInput): Promise<TestAssignment>;
1154
+ delete(id: string): Promise<void>;
1155
+ admin(params?: TestAssignmentsAdminParams): Promise<TestAssignmentsListResponse>;
1156
+ /**
1157
+ * Stream all test assignments (admin) with lazy pagination.
1158
+ *
1159
+ * @param params - Optional admin filters (supports student/status/subject/grade + limit/offset)
1160
+ * @returns Paginator that yields `TestAssignment` items
1161
+ */
1162
+ adminStream(params?: TestAssignmentsAdminStreamParams): Paginator<TestAssignment>;
1163
+ /**
1164
+ * Convenience helper to fetch all test assignments (admin).
1165
+ *
1166
+ * @param params - Optional admin filters
1167
+ * @returns All matching test assignments
1168
+ */
1169
+ adminListAll(params?: TestAssignmentsAdminStreamParams): Promise<TestAssignment[]>;
1170
+ bulk(input: TestAssignmentsBulkInput): Promise<BulkResult>;
1171
+ import(input: TestAssignmentsImportInput): Promise<BulkResult>;
1172
+ }
1173
+
1174
+ /**
1175
+ * PowerPath Client
1176
+ *
1177
+ * Main entry point for the PowerPath SDK.
1178
+ */
1179
+ /**
1180
+ * PowerPath API client for adaptive learning workflows.
1181
+ *
1182
+ * Provides access to PowerPath endpoints including placement testing,
1183
+ * lesson plans, assessment flow, screening sessions, and test assignments.
3
1184
  *
4
1185
  * @example
5
1186
  * ```typescript
6
1187
  * // Environment mode (Timeback APIs)
7
- * import { PowerPathClient } from '@timeback/powerpath'
8
- *
9
1188
  * const client = new PowerPathClient({
10
- * env: 'staging',
1189
+ * env: 'staging', // or 'production'
11
1190
  * auth: {
12
1191
  * clientId: 'your-client-id',
13
1192
  * clientSecret: 'your-client-secret',
14
1193
  * },
15
1194
  * })
1195
+ * ```
1196
+ *
1197
+ * @example
1198
+ * ```typescript
1199
+ * // Provider mode (shared tokens)
1200
+ * import { TimebackProvider } from '@timeback/internal-client-infra'
1201
+ *
1202
+ * const provider = new TimebackProvider({
1203
+ * platform: 'BEYOND_AI',
1204
+ * env: 'staging',
1205
+ * auth: { clientId: '...', clientSecret: '...' },
1206
+ * })
16
1207
  *
17
- * // Create an internal test
18
- * await client.assessments.createInternalTest({ ... })
1208
+ * const client = new PowerPathClient({ provider })
19
1209
  * ```
20
1210
  *
21
1211
  * @example
@@ -30,13 +1220,107 @@
30
1220
  * },
31
1221
  * })
32
1222
  * ```
1223
+ *
1224
+ * @example
1225
+ * ```typescript
1226
+ * // Environment variables fallback
1227
+ * // Set POWERPATH_BASE_URL, POWERPATH_TOKEN_URL,
1228
+ * // POWERPATH_CLIENT_ID, POWERPATH_CLIENT_SECRET
1229
+ * const client = new PowerPathClient()
1230
+ * ```
1231
+ */
1232
+ declare const PowerPathClient: {
1233
+ new (config?: PowerPathClientConfig): {
1234
+ readonly transport: PowerPathTransportLike;
1235
+ readonly _provider?: _timeback_internal_client_infra.TimebackProvider | undefined;
1236
+ readonly assessments: AssessmentResource;
1237
+ readonly lessonPlans: LessonPlansResource;
1238
+ readonly placement: PlacementResource;
1239
+ readonly screening: ScreeningResource;
1240
+ readonly syllabus: SyllabusResource;
1241
+ readonly testAssignments: TestAssignmentsResource;
1242
+ getTransport(): PowerPathTransportLike;
1243
+ checkAuth(): Promise<_timeback_internal_client_infra.AuthCheckResult>;
1244
+ };
1245
+ };
1246
+
1247
+ /**
1248
+ * PowerPath Client Factory
1249
+ *
1250
+ * Creates PowerPathClient classes bound to specific provider registries.
1251
+ */
1252
+
1253
+ /**
1254
+ * Create a PowerPathClient class bound to a specific provider registry.
1255
+ *
1256
+ * @param registry - Provider registry to use (defaults to all Timeback platforms)
1257
+ * @returns PowerPathClient class bound to the registry
1258
+ */
1259
+ declare function createPowerPathClient(registry?: ProviderRegistry): {
1260
+ new (config?: PowerPathClientConfig): {
1261
+ /** @internal */
1262
+ readonly transport: PowerPathTransportLike;
1263
+ /** @internal */
1264
+ readonly _provider?: TimebackProvider | undefined;
1265
+ /** Create tests, attempts, and assessment responses */
1266
+ readonly assessments: AssessmentResource;
1267
+ /** Manage lesson plans and course progress */
1268
+ readonly lessonPlans: LessonPlansResource;
1269
+ /** Placement testing and progress */
1270
+ readonly placement: PlacementResource;
1271
+ /** Screening sessions and results */
1272
+ readonly screening: ScreeningResource;
1273
+ /** Course syllabus retrieval */
1274
+ readonly syllabus: SyllabusResource;
1275
+ /** Test assignment CRUD and bulk operations */
1276
+ readonly testAssignments: TestAssignmentsResource;
1277
+ /**
1278
+ * Get the underlying transport for advanced use cases.
1279
+ * @returns The transport instance used by this client
1280
+ */
1281
+ getTransport(): PowerPathTransportLike;
1282
+ /**
1283
+ * Verify that OAuth authentication is working.
1284
+ * @returns Auth check result
1285
+ * @throws {Error} If client was initialized with custom transport (no provider)
1286
+ */
1287
+ checkAuth(): Promise<AuthCheckResult>;
1288
+ };
1289
+ };
1290
+
1291
+ /**
1292
+ * Transport Layer
1293
+ *
1294
+ * HTTP transport for PowerPath API communication.
1295
+ */
1296
+
1297
+ /**
1298
+ * HTTP transport layer for PowerPath API communication.
1299
+ *
1300
+ * Uses body-based pagination (totalCount, pageNumber, pageCount in response body).
33
1301
  */
34
- export { PowerPathClient, type PowerPathClientInstance } from './client';
35
- export { createPowerPathClient } from './factory';
36
- export type { PowerPathClientConfig } from './types/client';
37
- export type { Environment, EnvAuth, ExplicitAuth } from './types/client';
38
- export type { AuthCheckResult, ListParams, PageResult } from '@timeback/internal-client-infra';
39
- export type { AssignmentResult, BulkResult, TestAssignment, TestAssignmentStatus, TestAssignmentsListResponse, Attempt, CreateAttemptResponse, ExternalTestCreateResponse, GetAssessmentProgressResponse, GetAttemptsResponse, ResetAttemptResponse, GetAllPlacementTestsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetSubjectProgressResponse, ResetPlacementResponse, ScreeningAssignTestResponse, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, CourseProgressResponse, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationResult, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, UpdateStudentItemResponseResult, SyllabusResponse, PaginationMeta, } from '@timeback/types/protocols/powerpath';
40
- export type { CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, FinalStudentAssessmentResponseInput, GetAssessmentProgressParams, GetAttemptsParams, GetNextQuestionParams, ImportExternalTestAssignmentResultsParams, LessonPlanOperationInput, LessonPlanOperationsInput, LessonPlansCreateInput, LessonPlanUpdateStudentItemResponseInput, MakeExternalTestAssignmentInput, PlacementQueryParams, PlacementResetUserPlacementInput, ResetAttemptInput, ScreeningAssignTestInput, ScreeningResetSessionInput, SyllabusQueryParams, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsUpdateInput, TestOutParams, UpdateStudentQuestionResponseInput, } from '@timeback/types/zod';
41
- export { Paginator, Transport } from './lib';
42
- //# sourceMappingURL=index.d.ts.map
1302
+ declare class Transport extends BaseTransport {
1303
+ /** API path profiles for PowerPath operations */
1304
+ readonly paths: PowerPathPaths;
1305
+ constructor(config: PowerPathTransportConfig);
1306
+ /**
1307
+ * Make a paginated request using body-based pagination.
1308
+ *
1309
+ * PowerPath APIs return pagination metadata in the response body:
1310
+ * - `totalCount`: Total items across all pages
1311
+ * - `pageCount`: Total number of pages
1312
+ * - `pageNumber`: Current page (1-indexed)
1313
+ *
1314
+ * The returned `data` is the full response body. Use Paginator's `unwrapKey`
1315
+ * to extract the actual items (e.g., "testAssignments").
1316
+ *
1317
+ * @template T - Expected item type in the response
1318
+ * @param path - API endpoint path
1319
+ * @param options - Request options
1320
+ * @returns Normalized paginated response with body as data
1321
+ */
1322
+ requestPaginated<T>(path: string, options?: RequestOptions): Promise<PaginatedResponse<T>>;
1323
+ }
1324
+
1325
+ export { Paginator, PowerPathClient, Transport, createPowerPathClient };
1326
+ export type { AssignmentResult, Attempt, BulkResult, CourseProgressResponse, CreateAttemptResponse, CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, ExternalTestCreateResponse, FinalStudentAssessmentResponseInput, FinalizeAssessmentResponse, GetAllPlacementTestsResponse, GetAssessmentProgressParams, GetAssessmentProgressResponse, GetAttemptsParams, GetAttemptsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetNextQuestionParams, GetNextQuestionResponse, GetSubjectProgressResponse, ImportExternalResultsResponse, ImportExternalTestAssignmentResultsParams, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationInput, LessonPlanOperationResult, LessonPlanOperationsInput, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, LessonPlanUpdateStudentItemResponseInput, LessonPlansCreateInput, MakeExternalTestAssignmentInput, PaginationMeta, PlacementQueryParams, PlacementResetUserPlacementInput, PowerPath100ProgressResponse, PowerPath100UpdateResponseResult, PowerPathClientConfig, PowerPathClientInstance, PowerPathLessonType, PowerPathQuestionContent, PowerPathQuestionDifficulty, PowerPathQuestionResult, PowerPathTestQuestion, ResetAttemptInput, ResetAttemptResponse, ResetPlacementResponse, ResponseResult, ResponseResultFeedback, ScreeningAssignTestInput, ScreeningAssignTestResponse, ScreeningResetSessionInput, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, StandardProgressResponse, StandardUpdateResponseResult, SyllabusQueryParams, SyllabusResponse, TestAssignment, TestAssignmentStatus, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsListResponse, TestAssignmentsUpdateInput, TestOutParams, TestOutResponse, UpdateStudentItemResponseResult, UpdateStudentQuestionResponseInput, UpdateStudentQuestionResponseResult };