@thanh01.pmt/interactive-quiz-kit 1.0.9 → 1.0.10

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.mts CHANGED
@@ -1,13 +1,15 @@
1
- import { z } from 'genkit';
1
+ import { z } from 'zod';
2
2
  import { ClassValue } from 'clsx';
3
3
 
4
+ type RichContentString = string;
5
+ type MarkdownString = string;
4
6
  type QuestionTypeStrings = 'multiple_choice' | 'multiple_response' | 'fill_in_the_blanks' | 'drag_and_drop' | 'true_false' | 'short_answer' | 'numeric' | 'sequence' | 'matching' | 'hotspot' | 'blockly_programming' | 'scratch_programming';
5
7
  interface BaseQuestion {
6
8
  id: string;
7
9
  questionType: QuestionTypeStrings;
8
- prompt: string;
10
+ prompt: RichContentString;
9
11
  points?: number;
10
- explanation?: string;
12
+ explanation?: RichContentString;
11
13
  learningObjective?: string;
12
14
  glossary?: string[];
13
15
  bloomLevel?: string;
@@ -22,7 +24,7 @@ interface MultipleChoiceQuestion extends BaseQuestion {
22
24
  questionType: 'multiple_choice';
23
25
  options: {
24
26
  id: string;
25
- text: string;
27
+ text: RichContentString;
26
28
  }[];
27
29
  correctAnswerId: string;
28
30
  }
@@ -30,7 +32,7 @@ interface MultipleResponseQuestion extends BaseQuestion {
30
32
  questionType: 'multiple_response';
31
33
  options: {
32
34
  id: string;
33
- text: string;
35
+ text: RichContentString;
34
36
  }[];
35
37
  correctAnswerIds: string[];
36
38
  }
@@ -38,7 +40,7 @@ interface FillInTheBlanksQuestion extends BaseQuestion {
38
40
  questionType: 'fill_in_the_blanks';
39
41
  segments: {
40
42
  type: 'text' | 'blank';
41
- content?: string;
43
+ content?: RichContentString;
42
44
  id?: string;
43
45
  }[];
44
46
  answers: {
@@ -49,11 +51,11 @@ interface FillInTheBlanksQuestion extends BaseQuestion {
49
51
  }
50
52
  interface DraggableItem {
51
53
  id: string;
52
- content: string;
54
+ content: RichContentString;
53
55
  }
54
56
  interface DropZone {
55
57
  id: string;
56
- label: string;
58
+ label: RichContentString;
57
59
  }
58
60
  interface DragAndDropQuestion extends BaseQuestion {
59
61
  questionType: 'drag_and_drop';
@@ -82,7 +84,7 @@ interface NumericQuestion extends BaseQuestion {
82
84
  }
83
85
  interface SequenceItem {
84
86
  id: string;
85
- content: string;
87
+ content: RichContentString;
86
88
  }
87
89
  interface SequenceQuestion extends BaseQuestion {
88
90
  questionType: 'sequence';
@@ -91,11 +93,11 @@ interface SequenceQuestion extends BaseQuestion {
91
93
  }
92
94
  interface MatchPromptItem {
93
95
  id: string;
94
- content: string;
96
+ content: RichContentString;
95
97
  }
96
98
  interface MatchOptionItem {
97
99
  id: string;
98
- content: string;
100
+ content: RichContentString;
99
101
  }
100
102
  interface MatchingQuestion extends BaseQuestion {
101
103
  questionType: 'matching';
@@ -111,7 +113,7 @@ interface HotspotArea {
111
113
  id: string;
112
114
  shape: 'rect' | 'circle';
113
115
  coords: number[];
114
- description?: string;
116
+ description?: RichContentString;
115
117
  }
116
118
  interface HotspotQuestion extends BaseQuestion {
117
119
  questionType: 'hotspot';
@@ -138,7 +140,7 @@ type QuizQuestion = MultipleChoiceQuestion | MultipleResponseQuestion | FillInTh
138
140
  interface QuizConfig {
139
141
  id: string;
140
142
  title: string;
141
- description?: string;
143
+ description?: RichContentString;
142
144
  questions: QuizQuestion[];
143
145
  settings?: QuizSettings;
144
146
  }
@@ -167,6 +169,7 @@ interface SCORMSettings {
167
169
  scoreMinVar_2004?: string;
168
170
  }
169
171
  interface QuizSettings {
172
+ language?: string;
170
173
  shuffleQuestions?: boolean;
171
174
  shuffleOptions?: boolean;
172
175
  timeLimitMinutes?: number;
@@ -201,7 +204,7 @@ interface PerformanceByBloomLevel extends PerformanceMetric {
201
204
  }
202
205
  interface QuestionOption {
203
206
  id: string;
204
- text: string;
207
+ text: RichContentString;
205
208
  }
206
209
  interface QuizResult {
207
210
  score: number;
@@ -249,6 +252,11 @@ interface QuizEngineConstructorOptions {
249
252
  config: QuizConfig;
250
253
  callbacks?: QuizEngineCallbacks;
251
254
  }
255
+ interface ImportError {
256
+ index: number;
257
+ message: string;
258
+ data: any;
259
+ }
252
260
 
253
261
  declare class QuizEngine {
254
262
  private config;
@@ -348,8 +356,82 @@ declare const exportQuizAsSCORMZip: (quiz: QuizConfig, options: SCORMExportOptio
348
356
  fileName?: string;
349
357
  }>;
350
358
 
351
- declare const GenerateFillInTheBlanksQuestionInputSchema: z.ZodObject<{
359
+ declare const GEMINI_API_KEY_SERVICE_NAME = "gemini";
360
+ declare class APIKeyService {
361
+ private static getStorageKey;
362
+ /**
363
+ * Saves an API key to localStorage. The key is mildly obfuscated using Base64.
364
+ * @param serviceName - The name of the service (e.g., 'gemini').
365
+ * @param apiKey - The API key to save.
366
+ */
367
+ static saveAPIKey(serviceName: string, apiKey: string): void;
368
+ /**
369
+ * Retrieves an API key from localStorage.
370
+ * @param serviceName - The name of the service.
371
+ * @returns The decoded API key, or null if not found or if localStorage is unavailable.
372
+ */
373
+ static getAPIKey(serviceName: string): string | null;
374
+ /**
375
+ * Removes an API key from localStorage.
376
+ * @param serviceName - The name of the service.
377
+ */
378
+ static removeAPIKey(serviceName: string): void;
379
+ /**
380
+ * Checks if an API key exists in localStorage for the given service.
381
+ * @param serviceName - The name of the service.
382
+ * @returns True if a key exists, false otherwise.
383
+ */
384
+ static hasAPIKey(serviceName: string): boolean;
385
+ }
386
+
387
+ /**
388
+ * A service class to manage and manipulate a QuizConfig object in a headless way.
389
+ * This class operates on a deep copy of the initial quiz config to prevent side effects.
390
+ */
391
+ declare class QuizEditorService {
392
+ private quiz;
393
+ constructor(initialQuiz: QuizConfig);
394
+ /**
395
+ * Returns the current state of the quiz configuration.
396
+ * @returns The current QuizConfig object.
397
+ */
398
+ getQuiz(): QuizConfig;
399
+ /**
400
+ * Creates a new, "empty" question object based on the specified question type.
401
+ * @param type The type of question to create.
402
+ * @returns A new QuizQuestion object with default values.
403
+ */
404
+ static createNewQuestionTemplate(type: QuestionTypeStrings): QuizQuestion;
405
+ /**
406
+ * Adds a new question to the quiz. If the question ID is temporary, a new permanent ID is generated.
407
+ * @param question The question object to add.
408
+ * @returns The updated QuizConfig.
409
+ */
410
+ addQuestion(question: QuizQuestion): QuizConfig;
411
+ /**
412
+ * Updates an existing question in the quiz.
413
+ * @param updatedQuestion The full question object with changes.
414
+ * @returns The updated QuizConfig.
415
+ */
416
+ updateQuestion(updatedQuestion: QuizQuestion): QuizConfig;
417
+ /**
418
+ * Deletes a question from the quiz by its index.
419
+ * @param index The index of the question to delete.
420
+ * @returns The updated QuizConfig.
421
+ */
422
+ deleteQuestionByIndex(index: number): QuizConfig;
423
+ /**
424
+ * Moves a question from one position to another.
425
+ * @param fromIndex The current index of the question.
426
+ * @param toIndex The target index for the question.
427
+ * @returns The updated QuizConfig.
428
+ */
429
+ moveQuestion(fromIndex: number, toIndex: number): QuizConfig;
430
+ }
431
+
432
+ declare const GenerateFillInTheBlanksQuestionClientInputSchema: z.ZodObject<{
352
433
  topic: z.ZodString;
434
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
353
435
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
354
436
  numberOfBlanks: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
355
437
  isCaseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -358,6 +440,7 @@ declare const GenerateFillInTheBlanksQuestionInputSchema: z.ZodObject<{
358
440
  }, "strip", z.ZodTypeAny, {
359
441
  topic: string;
360
442
  difficulty: "easy" | "medium" | "hard";
443
+ language: string;
361
444
  numberOfBlanks: number;
362
445
  isCaseSensitive: boolean;
363
446
  contextDescription?: string | undefined;
@@ -365,14 +448,15 @@ declare const GenerateFillInTheBlanksQuestionInputSchema: z.ZodObject<{
365
448
  }, {
366
449
  topic: string;
367
450
  difficulty?: "easy" | "medium" | "hard" | undefined;
451
+ language?: string | undefined;
368
452
  numberOfBlanks?: number | undefined;
369
453
  isCaseSensitive?: boolean | undefined;
370
454
  contextDescription?: string | undefined;
371
455
  selectedContextId?: string | undefined;
372
456
  }>;
373
- type GenerateFillInTheBlanksQuestionInput = z.infer<typeof GenerateFillInTheBlanksQuestionInputSchema>;
457
+ type GenerateFillInTheBlanksQuestionClientInput = z.infer<typeof GenerateFillInTheBlanksQuestionClientInputSchema>;
374
458
  declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
375
- question: z.ZodOptional<z.ZodObject<{
459
+ question: z.ZodOptional<z.ZodEffects<z.ZodObject<{
376
460
  id: z.ZodString;
377
461
  questionType: z.ZodLiteral<"fill_in_the_blanks">;
378
462
  prompt: z.ZodString;
@@ -402,15 +486,6 @@ declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
402
486
  isCaseSensitive: z.ZodOptional<z.ZodBoolean>;
403
487
  points: z.ZodOptional<z.ZodNumber>;
404
488
  explanation: z.ZodOptional<z.ZodString>;
405
- learningObjective: z.ZodOptional<z.ZodString>;
406
- glossary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
407
- bloomLevel: z.ZodOptional<z.ZodString>;
408
- difficulty: z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>;
409
- contextCode: z.ZodOptional<z.ZodString>;
410
- gradeBand: z.ZodOptional<z.ZodString>;
411
- course: z.ZodOptional<z.ZodString>;
412
- category: z.ZodOptional<z.ZodString>;
413
- topic: z.ZodOptional<z.ZodString>;
414
489
  }, "strip", z.ZodTypeAny, {
415
490
  answers: {
416
491
  blankId: string;
@@ -424,18 +499,9 @@ declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
424
499
  id?: string | undefined;
425
500
  content?: string | undefined;
426
501
  }[];
427
- learningObjective?: string | undefined;
428
- category?: string | undefined;
429
- topic?: string | undefined;
430
- difficulty?: "easy" | "medium" | "hard" | undefined;
431
- bloomLevel?: string | undefined;
432
502
  isCaseSensitive?: boolean | undefined;
433
503
  explanation?: string | undefined;
434
504
  points?: number | undefined;
435
- glossary?: string[] | undefined;
436
- contextCode?: string | undefined;
437
- gradeBand?: string | undefined;
438
- course?: string | undefined;
439
505
  }, {
440
506
  answers: {
441
507
  blankId: string;
@@ -449,18 +515,41 @@ declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
449
515
  id?: string | undefined;
450
516
  content?: string | undefined;
451
517
  }[];
452
- learningObjective?: string | undefined;
453
- category?: string | undefined;
454
- topic?: string | undefined;
455
- difficulty?: "easy" | "medium" | "hard" | undefined;
456
- bloomLevel?: string | undefined;
457
518
  isCaseSensitive?: boolean | undefined;
458
519
  explanation?: string | undefined;
459
520
  points?: number | undefined;
460
- glossary?: string[] | undefined;
461
- contextCode?: string | undefined;
462
- gradeBand?: string | undefined;
463
- course?: string | undefined;
521
+ }>, {
522
+ answers: {
523
+ blankId: string;
524
+ acceptedValues: string[];
525
+ }[];
526
+ prompt: string;
527
+ id: string;
528
+ questionType: "fill_in_the_blanks";
529
+ segments: {
530
+ type: "text" | "blank";
531
+ id?: string | undefined;
532
+ content?: string | undefined;
533
+ }[];
534
+ isCaseSensitive?: boolean | undefined;
535
+ explanation?: string | undefined;
536
+ points?: number | undefined;
537
+ }, {
538
+ answers: {
539
+ blankId: string;
540
+ acceptedValues: string[];
541
+ }[];
542
+ prompt: string;
543
+ id: string;
544
+ questionType: "fill_in_the_blanks";
545
+ segments: {
546
+ type: "text" | "blank";
547
+ id?: string | undefined;
548
+ content?: string | undefined;
549
+ }[];
550
+ isCaseSensitive?: boolean | undefined;
551
+ explanation?: string | undefined;
552
+ points?: number | undefined;
464
553
  }>>;
465
554
  }, "strip", z.ZodTypeAny, {
466
555
  question?: {
@@ -476,18 +565,9 @@ declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
476
565
  id?: string | undefined;
477
566
  content?: string | undefined;
478
567
  }[];
479
- learningObjective?: string | undefined;
480
- category?: string | undefined;
481
- topic?: string | undefined;
482
- difficulty?: "easy" | "medium" | "hard" | undefined;
483
- bloomLevel?: string | undefined;
484
568
  isCaseSensitive?: boolean | undefined;
485
569
  explanation?: string | undefined;
486
570
  points?: number | undefined;
487
- glossary?: string[] | undefined;
488
- contextCode?: string | undefined;
489
- gradeBand?: string | undefined;
490
- course?: string | undefined;
491
571
  } | undefined;
492
572
  }, {
493
573
  question?: {
@@ -503,25 +583,17 @@ declare const GenerateFillInTheBlanksQuestionOutputSchema: z.ZodObject<{
503
583
  id?: string | undefined;
504
584
  content?: string | undefined;
505
585
  }[];
506
- learningObjective?: string | undefined;
507
- category?: string | undefined;
508
- topic?: string | undefined;
509
- difficulty?: "easy" | "medium" | "hard" | undefined;
510
- bloomLevel?: string | undefined;
511
586
  isCaseSensitive?: boolean | undefined;
512
587
  explanation?: string | undefined;
513
588
  points?: number | undefined;
514
- glossary?: string[] | undefined;
515
- contextCode?: string | undefined;
516
- gradeBand?: string | undefined;
517
- course?: string | undefined;
518
589
  } | undefined;
519
590
  }>;
520
591
  type GenerateFillInTheBlanksQuestionOutput = z.infer<typeof GenerateFillInTheBlanksQuestionOutputSchema>;
521
- declare function generateFillInTheBlanksQuestion(input: GenerateFillInTheBlanksQuestionInput): Promise<GenerateFillInTheBlanksQuestionOutput>;
592
+ declare function generateFillInTheBlanksQuestion(clientInput: GenerateFillInTheBlanksQuestionClientInput, apiKey: string): Promise<GenerateFillInTheBlanksQuestionOutput>;
522
593
 
523
- declare const GenerateMatchingQuestionInputSchema: z.ZodObject<{
594
+ declare const GenerateMatchingQuestionClientInputSchema: z.ZodObject<{
524
595
  topic: z.ZodString;
596
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
525
597
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
526
598
  numberOfPairs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
527
599
  shuffleOptions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -531,6 +603,7 @@ declare const GenerateMatchingQuestionInputSchema: z.ZodObject<{
531
603
  topic: string;
532
604
  difficulty: "easy" | "medium" | "hard";
533
605
  shuffleOptions: boolean;
606
+ language: string;
534
607
  numberOfPairs: number;
535
608
  contextDescription?: string | undefined;
536
609
  selectedContextId?: string | undefined;
@@ -538,13 +611,14 @@ declare const GenerateMatchingQuestionInputSchema: z.ZodObject<{
538
611
  topic: string;
539
612
  difficulty?: "easy" | "medium" | "hard" | undefined;
540
613
  shuffleOptions?: boolean | undefined;
614
+ language?: string | undefined;
541
615
  contextDescription?: string | undefined;
542
616
  selectedContextId?: string | undefined;
543
617
  numberOfPairs?: number | undefined;
544
618
  }>;
545
- type GenerateMatchingQuestionInput = z.infer<typeof GenerateMatchingQuestionInputSchema>;
619
+ type GenerateMatchingQuestionClientInput = z.infer<typeof GenerateMatchingQuestionClientInputSchema>;
546
620
  declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
547
- question: z.ZodOptional<z.ZodObject<{
621
+ question: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
548
622
  id: z.ZodString;
549
623
  questionType: z.ZodLiteral<"matching">;
550
624
  prompt: z.ZodString;
@@ -581,15 +655,6 @@ declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
581
655
  shuffleOptions: z.ZodOptional<z.ZodBoolean>;
582
656
  points: z.ZodOptional<z.ZodNumber>;
583
657
  explanation: z.ZodOptional<z.ZodString>;
584
- learningObjective: z.ZodOptional<z.ZodString>;
585
- glossary: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
586
- bloomLevel: z.ZodOptional<z.ZodString>;
587
- difficulty: z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>;
588
- contextCode: z.ZodOptional<z.ZodString>;
589
- gradeBand: z.ZodOptional<z.ZodString>;
590
- course: z.ZodOptional<z.ZodString>;
591
- category: z.ZodOptional<z.ZodString>;
592
- topic: z.ZodOptional<z.ZodString>;
593
658
  }, "strip", z.ZodTypeAny, {
594
659
  options: {
595
660
  id: string;
@@ -606,18 +671,9 @@ declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
606
671
  promptId: string;
607
672
  optionId: string;
608
673
  }[];
609
- learningObjective?: string | undefined;
610
- category?: string | undefined;
611
- topic?: string | undefined;
612
- difficulty?: "easy" | "medium" | "hard" | undefined;
613
- bloomLevel?: string | undefined;
614
674
  shuffleOptions?: boolean | undefined;
615
675
  explanation?: string | undefined;
616
676
  points?: number | undefined;
617
- glossary?: string[] | undefined;
618
- contextCode?: string | undefined;
619
- gradeBand?: string | undefined;
620
- course?: string | undefined;
621
677
  }, {
622
678
  options: {
623
679
  id: string;
@@ -634,18 +690,85 @@ declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
634
690
  promptId: string;
635
691
  optionId: string;
636
692
  }[];
637
- learningObjective?: string | undefined;
638
- category?: string | undefined;
639
- topic?: string | undefined;
640
- difficulty?: "easy" | "medium" | "hard" | undefined;
641
- bloomLevel?: string | undefined;
642
693
  shuffleOptions?: boolean | undefined;
643
694
  explanation?: string | undefined;
644
695
  points?: number | undefined;
645
- glossary?: string[] | undefined;
646
- contextCode?: string | undefined;
647
- gradeBand?: string | undefined;
648
- course?: string | undefined;
696
+ }>, {
697
+ options: {
698
+ id: string;
699
+ content: string;
700
+ }[];
701
+ prompt: string;
702
+ id: string;
703
+ questionType: "matching";
704
+ prompts: {
705
+ id: string;
706
+ content: string;
707
+ }[];
708
+ correctAnswerMap: {
709
+ promptId: string;
710
+ optionId: string;
711
+ }[];
712
+ shuffleOptions?: boolean | undefined;
713
+ explanation?: string | undefined;
714
+ points?: number | undefined;
715
+ }, {
716
+ options: {
717
+ id: string;
718
+ content: string;
719
+ }[];
720
+ prompt: string;
721
+ id: string;
722
+ questionType: "matching";
723
+ prompts: {
724
+ id: string;
725
+ content: string;
726
+ }[];
727
+ correctAnswerMap: {
728
+ promptId: string;
729
+ optionId: string;
730
+ }[];
731
+ shuffleOptions?: boolean | undefined;
732
+ explanation?: string | undefined;
733
+ points?: number | undefined;
734
+ }>, {
735
+ options: {
736
+ id: string;
737
+ content: string;
738
+ }[];
739
+ prompt: string;
740
+ id: string;
741
+ questionType: "matching";
742
+ prompts: {
743
+ id: string;
744
+ content: string;
745
+ }[];
746
+ correctAnswerMap: {
747
+ promptId: string;
748
+ optionId: string;
749
+ }[];
750
+ shuffleOptions?: boolean | undefined;
751
+ explanation?: string | undefined;
752
+ points?: number | undefined;
753
+ }, {
754
+ options: {
755
+ id: string;
756
+ content: string;
757
+ }[];
758
+ prompt: string;
759
+ id: string;
760
+ questionType: "matching";
761
+ prompts: {
762
+ id: string;
763
+ content: string;
764
+ }[];
765
+ correctAnswerMap: {
766
+ promptId: string;
767
+ optionId: string;
768
+ }[];
769
+ shuffleOptions?: boolean | undefined;
770
+ explanation?: string | undefined;
771
+ points?: number | undefined;
649
772
  }>>;
650
773
  }, "strip", z.ZodTypeAny, {
651
774
  question?: {
@@ -664,18 +787,9 @@ declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
664
787
  promptId: string;
665
788
  optionId: string;
666
789
  }[];
667
- learningObjective?: string | undefined;
668
- category?: string | undefined;
669
- topic?: string | undefined;
670
- difficulty?: "easy" | "medium" | "hard" | undefined;
671
- bloomLevel?: string | undefined;
672
790
  shuffleOptions?: boolean | undefined;
673
791
  explanation?: string | undefined;
674
792
  points?: number | undefined;
675
- glossary?: string[] | undefined;
676
- contextCode?: string | undefined;
677
- gradeBand?: string | undefined;
678
- course?: string | undefined;
679
793
  } | undefined;
680
794
  }, {
681
795
  question?: {
@@ -694,25 +808,17 @@ declare const GenerateMatchingQuestionOutputSchema: z.ZodObject<{
694
808
  promptId: string;
695
809
  optionId: string;
696
810
  }[];
697
- learningObjective?: string | undefined;
698
- category?: string | undefined;
699
- topic?: string | undefined;
700
- difficulty?: "easy" | "medium" | "hard" | undefined;
701
- bloomLevel?: string | undefined;
702
811
  shuffleOptions?: boolean | undefined;
703
812
  explanation?: string | undefined;
704
813
  points?: number | undefined;
705
- glossary?: string[] | undefined;
706
- contextCode?: string | undefined;
707
- gradeBand?: string | undefined;
708
- course?: string | undefined;
709
814
  } | undefined;
710
815
  }>;
711
816
  type GenerateMatchingQuestionOutput = z.infer<typeof GenerateMatchingQuestionOutputSchema>;
712
- declare function generateMatchingQuestion(input: GenerateMatchingQuestionInput): Promise<GenerateMatchingQuestionOutput>;
817
+ declare function generateMatchingQuestion(clientInput: GenerateMatchingQuestionClientInput, apiKey: string): Promise<GenerateMatchingQuestionOutput>;
713
818
 
714
- declare const GenerateMCQQuestionInputSchema: z.ZodObject<{
819
+ declare const GenerateMCQQuestionClientInputSchema: z.ZodObject<{
715
820
  topic: z.ZodString;
821
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
716
822
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
717
823
  numberOfOptions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
718
824
  contextDescription: z.ZodOptional<z.ZodString>;
@@ -720,19 +826,21 @@ declare const GenerateMCQQuestionInputSchema: z.ZodObject<{
720
826
  }, "strip", z.ZodTypeAny, {
721
827
  topic: string;
722
828
  difficulty: "easy" | "medium" | "hard";
829
+ language: string;
723
830
  numberOfOptions: number;
724
831
  contextDescription?: string | undefined;
725
832
  selectedContextId?: string | undefined;
726
833
  }, {
727
834
  topic: string;
728
835
  difficulty?: "easy" | "medium" | "hard" | undefined;
836
+ language?: string | undefined;
729
837
  contextDescription?: string | undefined;
730
838
  selectedContextId?: string | undefined;
731
839
  numberOfOptions?: number | undefined;
732
840
  }>;
733
- type GenerateMCQQuestionInput = z.infer<typeof GenerateMCQQuestionInputSchema>;
841
+ type GenerateMCQQuestionClientInput = z.infer<typeof GenerateMCQQuestionClientInputSchema>;
734
842
  declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
735
- question: z.ZodOptional<z.ZodObject<{
843
+ question: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
736
844
  id: z.ZodString;
737
845
  questionType: z.ZodLiteral<"multiple_choice">;
738
846
  prompt: z.ZodString;
@@ -763,10 +871,50 @@ declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
763
871
  text: string;
764
872
  id: string;
765
873
  }[];
874
+ correctAnswerId: string;
875
+ prompt: string;
876
+ id: string;
877
+ questionType: "multiple_choice";
878
+ learningObjective?: string | undefined;
879
+ category?: string | undefined;
880
+ topic?: string | undefined;
881
+ difficulty?: "easy" | "medium" | "hard" | undefined;
882
+ bloomLevel?: string | undefined;
883
+ explanation?: string | undefined;
884
+ points?: number | undefined;
885
+ glossary?: string[] | undefined;
886
+ contextCode?: string | undefined;
887
+ gradeBand?: string | undefined;
888
+ course?: string | undefined;
889
+ }, {
890
+ options: {
891
+ text: string;
892
+ id: string;
893
+ }[];
894
+ correctAnswerId: string;
766
895
  prompt: string;
767
896
  id: string;
768
897
  questionType: "multiple_choice";
898
+ learningObjective?: string | undefined;
899
+ category?: string | undefined;
900
+ topic?: string | undefined;
901
+ difficulty?: "easy" | "medium" | "hard" | undefined;
902
+ bloomLevel?: string | undefined;
903
+ explanation?: string | undefined;
904
+ points?: number | undefined;
905
+ glossary?: string[] | undefined;
906
+ contextCode?: string | undefined;
907
+ gradeBand?: string | undefined;
908
+ course?: string | undefined;
909
+ }>, {
910
+ options: {
911
+ text: string;
912
+ id: string;
913
+ }[];
769
914
  correctAnswerId: string;
915
+ prompt: string;
916
+ id: string;
917
+ questionType: "multiple_choice";
770
918
  learningObjective?: string | undefined;
771
919
  category?: string | undefined;
772
920
  topic?: string | undefined;
@@ -783,10 +931,50 @@ declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
783
931
  text: string;
784
932
  id: string;
785
933
  }[];
934
+ correctAnswerId: string;
935
+ prompt: string;
936
+ id: string;
937
+ questionType: "multiple_choice";
938
+ learningObjective?: string | undefined;
939
+ category?: string | undefined;
940
+ topic?: string | undefined;
941
+ difficulty?: "easy" | "medium" | "hard" | undefined;
942
+ bloomLevel?: string | undefined;
943
+ explanation?: string | undefined;
944
+ points?: number | undefined;
945
+ glossary?: string[] | undefined;
946
+ contextCode?: string | undefined;
947
+ gradeBand?: string | undefined;
948
+ course?: string | undefined;
949
+ }>, {
950
+ options: {
951
+ text: string;
952
+ id: string;
953
+ }[];
954
+ correctAnswerId: string;
786
955
  prompt: string;
787
956
  id: string;
788
957
  questionType: "multiple_choice";
958
+ learningObjective?: string | undefined;
959
+ category?: string | undefined;
960
+ topic?: string | undefined;
961
+ difficulty?: "easy" | "medium" | "hard" | undefined;
962
+ bloomLevel?: string | undefined;
963
+ explanation?: string | undefined;
964
+ points?: number | undefined;
965
+ glossary?: string[] | undefined;
966
+ contextCode?: string | undefined;
967
+ gradeBand?: string | undefined;
968
+ course?: string | undefined;
969
+ }, {
970
+ options: {
971
+ text: string;
972
+ id: string;
973
+ }[];
789
974
  correctAnswerId: string;
975
+ prompt: string;
976
+ id: string;
977
+ questionType: "multiple_choice";
790
978
  learningObjective?: string | undefined;
791
979
  category?: string | undefined;
792
980
  topic?: string | undefined;
@@ -805,10 +993,10 @@ declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
805
993
  text: string;
806
994
  id: string;
807
995
  }[];
996
+ correctAnswerId: string;
808
997
  prompt: string;
809
998
  id: string;
810
999
  questionType: "multiple_choice";
811
- correctAnswerId: string;
812
1000
  learningObjective?: string | undefined;
813
1001
  category?: string | undefined;
814
1002
  topic?: string | undefined;
@@ -827,10 +1015,10 @@ declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
827
1015
  text: string;
828
1016
  id: string;
829
1017
  }[];
1018
+ correctAnswerId: string;
830
1019
  prompt: string;
831
1020
  id: string;
832
1021
  questionType: "multiple_choice";
833
- correctAnswerId: string;
834
1022
  learningObjective?: string | undefined;
835
1023
  category?: string | undefined;
836
1024
  topic?: string | undefined;
@@ -845,10 +1033,11 @@ declare const GenerateMCQQuestionOutputSchema: z.ZodObject<{
845
1033
  } | undefined;
846
1034
  }>;
847
1035
  type GenerateMCQQuestionOutput = z.infer<typeof GenerateMCQQuestionOutputSchema>;
848
- declare function generateMCQQuestion(input: GenerateMCQQuestionInput): Promise<GenerateMCQQuestionOutput>;
1036
+ declare function generateMCQQuestion(clientInput: GenerateMCQQuestionClientInput, apiKey: string): Promise<GenerateMCQQuestionOutput>;
849
1037
 
850
- declare const GenerateMRQQuestionInputSchema: z.ZodObject<{
1038
+ declare const GenerateMRQQuestionClientInputSchema: z.ZodObject<{
851
1039
  topic: z.ZodString;
1040
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
852
1041
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
853
1042
  numberOfOptions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
854
1043
  minCorrectAnswers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -858,6 +1047,7 @@ declare const GenerateMRQQuestionInputSchema: z.ZodObject<{
858
1047
  }, "strip", z.ZodTypeAny, {
859
1048
  topic: string;
860
1049
  difficulty: "easy" | "medium" | "hard";
1050
+ language: string;
861
1051
  numberOfOptions: number;
862
1052
  minCorrectAnswers: number;
863
1053
  maxCorrectAnswers: number;
@@ -866,15 +1056,16 @@ declare const GenerateMRQQuestionInputSchema: z.ZodObject<{
866
1056
  }, {
867
1057
  topic: string;
868
1058
  difficulty?: "easy" | "medium" | "hard" | undefined;
1059
+ language?: string | undefined;
869
1060
  contextDescription?: string | undefined;
870
1061
  selectedContextId?: string | undefined;
871
1062
  numberOfOptions?: number | undefined;
872
1063
  minCorrectAnswers?: number | undefined;
873
1064
  maxCorrectAnswers?: number | undefined;
874
1065
  }>;
875
- type GenerateMRQQuestionInput = z.infer<typeof GenerateMRQQuestionInputSchema>;
1066
+ type GenerateMRQQuestionClientInput = z.infer<typeof GenerateMRQQuestionClientInputSchema>;
876
1067
  declare const GenerateMRQQuestionOutputSchema: z.ZodObject<{
877
- question: z.ZodOptional<z.ZodObject<{
1068
+ question: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
878
1069
  id: z.ZodString;
879
1070
  questionType: z.ZodLiteral<"multiple_response">;
880
1071
  prompt: z.ZodString;
@@ -940,6 +1131,86 @@ declare const GenerateMRQQuestionOutputSchema: z.ZodObject<{
940
1131
  contextCode?: string | undefined;
941
1132
  gradeBand?: string | undefined;
942
1133
  course?: string | undefined;
1134
+ }>, {
1135
+ options: {
1136
+ text: string;
1137
+ id: string;
1138
+ }[];
1139
+ prompt: string;
1140
+ id: string;
1141
+ questionType: "multiple_response";
1142
+ correctAnswerIds: string[];
1143
+ learningObjective?: string | undefined;
1144
+ category?: string | undefined;
1145
+ topic?: string | undefined;
1146
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1147
+ bloomLevel?: string | undefined;
1148
+ explanation?: string | undefined;
1149
+ points?: number | undefined;
1150
+ glossary?: string[] | undefined;
1151
+ contextCode?: string | undefined;
1152
+ gradeBand?: string | undefined;
1153
+ course?: string | undefined;
1154
+ }, {
1155
+ options: {
1156
+ text: string;
1157
+ id: string;
1158
+ }[];
1159
+ prompt: string;
1160
+ id: string;
1161
+ questionType: "multiple_response";
1162
+ correctAnswerIds: string[];
1163
+ learningObjective?: string | undefined;
1164
+ category?: string | undefined;
1165
+ topic?: string | undefined;
1166
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1167
+ bloomLevel?: string | undefined;
1168
+ explanation?: string | undefined;
1169
+ points?: number | undefined;
1170
+ glossary?: string[] | undefined;
1171
+ contextCode?: string | undefined;
1172
+ gradeBand?: string | undefined;
1173
+ course?: string | undefined;
1174
+ }>, {
1175
+ options: {
1176
+ text: string;
1177
+ id: string;
1178
+ }[];
1179
+ prompt: string;
1180
+ id: string;
1181
+ questionType: "multiple_response";
1182
+ correctAnswerIds: string[];
1183
+ learningObjective?: string | undefined;
1184
+ category?: string | undefined;
1185
+ topic?: string | undefined;
1186
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1187
+ bloomLevel?: string | undefined;
1188
+ explanation?: string | undefined;
1189
+ points?: number | undefined;
1190
+ glossary?: string[] | undefined;
1191
+ contextCode?: string | undefined;
1192
+ gradeBand?: string | undefined;
1193
+ course?: string | undefined;
1194
+ }, {
1195
+ options: {
1196
+ text: string;
1197
+ id: string;
1198
+ }[];
1199
+ prompt: string;
1200
+ id: string;
1201
+ questionType: "multiple_response";
1202
+ correctAnswerIds: string[];
1203
+ learningObjective?: string | undefined;
1204
+ category?: string | undefined;
1205
+ topic?: string | undefined;
1206
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1207
+ bloomLevel?: string | undefined;
1208
+ explanation?: string | undefined;
1209
+ points?: number | undefined;
1210
+ glossary?: string[] | undefined;
1211
+ contextCode?: string | undefined;
1212
+ gradeBand?: string | undefined;
1213
+ course?: string | undefined;
943
1214
  }>>;
944
1215
  }, "strip", z.ZodTypeAny, {
945
1216
  question?: {
@@ -987,10 +1258,11 @@ declare const GenerateMRQQuestionOutputSchema: z.ZodObject<{
987
1258
  } | undefined;
988
1259
  }>;
989
1260
  type GenerateMRQQuestionOutput = z.infer<typeof GenerateMRQQuestionOutputSchema>;
990
- declare function generateMRQQuestion(input: GenerateMRQQuestionInput): Promise<GenerateMRQQuestionOutput>;
1261
+ declare function generateMRQQuestion(clientInput: GenerateMRQQuestionClientInput, apiKey: string): Promise<GenerateMRQQuestionOutput>;
991
1262
 
992
- declare const GenerateNumericQuestionInputSchema: z.ZodObject<{
1263
+ declare const GenerateNumericQuestionClientInputSchema: z.ZodObject<{
993
1264
  topic: z.ZodString;
1265
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
994
1266
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
995
1267
  allowDecimals: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
996
1268
  minRange: z.ZodOptional<z.ZodNumber>;
@@ -1000,6 +1272,7 @@ declare const GenerateNumericQuestionInputSchema: z.ZodObject<{
1000
1272
  }, "strip", z.ZodTypeAny, {
1001
1273
  topic: string;
1002
1274
  difficulty: "easy" | "medium" | "hard";
1275
+ language: string;
1003
1276
  allowDecimals: boolean;
1004
1277
  contextDescription?: string | undefined;
1005
1278
  selectedContextId?: string | undefined;
@@ -1008,13 +1281,14 @@ declare const GenerateNumericQuestionInputSchema: z.ZodObject<{
1008
1281
  }, {
1009
1282
  topic: string;
1010
1283
  difficulty?: "easy" | "medium" | "hard" | undefined;
1284
+ language?: string | undefined;
1011
1285
  contextDescription?: string | undefined;
1012
1286
  selectedContextId?: string | undefined;
1013
1287
  allowDecimals?: boolean | undefined;
1014
1288
  minRange?: number | undefined;
1015
1289
  maxRange?: number | undefined;
1016
1290
  }>;
1017
- type GenerateNumericQuestionInput = z.infer<typeof GenerateNumericQuestionInputSchema>;
1291
+ type GenerateNumericQuestionClientInput = z.infer<typeof GenerateNumericQuestionClientInputSchema>;
1018
1292
  declare const GenerateNumericQuestionOutputSchema: z.ZodObject<{
1019
1293
  question: z.ZodOptional<z.ZodObject<{
1020
1294
  id: z.ZodString;
@@ -1108,11 +1382,12 @@ declare const GenerateNumericQuestionOutputSchema: z.ZodObject<{
1108
1382
  } | undefined;
1109
1383
  }>;
1110
1384
  type GenerateNumericQuestionOutput = z.infer<typeof GenerateNumericQuestionOutputSchema>;
1111
- declare function generateNumericQuestion(input: GenerateNumericQuestionInput): Promise<GenerateNumericQuestionOutput>;
1385
+ declare function generateNumericQuestion(clientInput: GenerateNumericQuestionClientInput, apiKey: string): Promise<GenerateNumericQuestionOutput>;
1112
1386
 
1113
1387
  declare const BloomLevelStringsEnum: z.ZodEnum<["remembering", "understanding", "applying"]>;
1114
1388
  type BloomLevelStringsForAI = z.infer<typeof BloomLevelStringsEnum>;
1115
- declare const GenerateQuizPlanInputSchema: z.ZodObject<{
1389
+ declare const GenerateQuizPlanClientInputSchema: z.ZodObject<{
1390
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1116
1391
  totalQuestions: z.ZodNumber;
1117
1392
  topics: z.ZodArray<z.ZodObject<{
1118
1393
  topic: z.ZodString;
@@ -1138,6 +1413,7 @@ declare const GenerateQuizPlanInputSchema: z.ZodObject<{
1138
1413
  selectedQuestionTypes: z.ZodArray<z.ZodEnum<[QuestionTypeStrings, ...QuestionTypeStrings[]]>, "many">;
1139
1414
  }, "strip", z.ZodTypeAny, {
1140
1415
  totalQuestions: number;
1416
+ language: string;
1141
1417
  topics: {
1142
1418
  topic: string;
1143
1419
  ratio: number;
@@ -1159,9 +1435,10 @@ declare const GenerateQuizPlanInputSchema: z.ZodObject<{
1159
1435
  level: "remembering" | "understanding" | "applying";
1160
1436
  }[];
1161
1437
  selectedQuestionTypes: QuestionTypeStrings[];
1438
+ language?: string | undefined;
1162
1439
  selectedContextIds?: string[] | undefined;
1163
1440
  }>;
1164
- type GenerateQuizPlanInput = z.infer<typeof GenerateQuizPlanInputSchema>;
1441
+ type GenerateQuizPlanClientInput = z.infer<typeof GenerateQuizPlanClientInputSchema>;
1165
1442
  declare const PlannedQuestionSchema: z.ZodObject<{
1166
1443
  plannedTopic: z.ZodString;
1167
1444
  plannedQuestionType: z.ZodEnum<[QuestionTypeStrings, ...QuestionTypeStrings[]]>;
@@ -1204,10 +1481,11 @@ declare const GenerateQuizPlanOutputSchema: z.ZodObject<{
1204
1481
  }[];
1205
1482
  }>;
1206
1483
  type GenerateQuizPlanOutput = z.infer<typeof GenerateQuizPlanOutputSchema>;
1207
- declare function generateQuizPlan(input: GenerateQuizPlanInput): Promise<GenerateQuizPlanOutput>;
1484
+ declare function generateQuizPlan(clientInput: GenerateQuizPlanClientInput, apiKey: string): Promise<GenerateQuizPlanOutput>;
1208
1485
 
1209
- declare const GenerateSequenceQuestionInputSchema: z.ZodObject<{
1486
+ declare const GenerateSequenceQuestionClientInputSchema: z.ZodObject<{
1210
1487
  topic: z.ZodString;
1488
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1211
1489
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
1212
1490
  numberOfItems: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1213
1491
  contextDescription: z.ZodOptional<z.ZodString>;
@@ -1215,19 +1493,21 @@ declare const GenerateSequenceQuestionInputSchema: z.ZodObject<{
1215
1493
  }, "strip", z.ZodTypeAny, {
1216
1494
  topic: string;
1217
1495
  difficulty: "easy" | "medium" | "hard";
1496
+ language: string;
1218
1497
  numberOfItems: number;
1219
1498
  contextDescription?: string | undefined;
1220
1499
  selectedContextId?: string | undefined;
1221
1500
  }, {
1222
1501
  topic: string;
1223
1502
  difficulty?: "easy" | "medium" | "hard" | undefined;
1503
+ language?: string | undefined;
1224
1504
  contextDescription?: string | undefined;
1225
1505
  selectedContextId?: string | undefined;
1226
1506
  numberOfItems?: number | undefined;
1227
1507
  }>;
1228
- type GenerateSequenceQuestionInput = z.infer<typeof GenerateSequenceQuestionInputSchema>;
1508
+ type GenerateSequenceQuestionClientInput = z.infer<typeof GenerateSequenceQuestionClientInputSchema>;
1229
1509
  declare const GenerateSequenceQuestionOutputSchema: z.ZodObject<{
1230
- question: z.ZodOptional<z.ZodObject<{
1510
+ question: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
1231
1511
  id: z.ZodString;
1232
1512
  questionType: z.ZodLiteral<"sequence">;
1233
1513
  prompt: z.ZodString;
@@ -1293,6 +1573,126 @@ declare const GenerateSequenceQuestionOutputSchema: z.ZodObject<{
1293
1573
  contextCode?: string | undefined;
1294
1574
  gradeBand?: string | undefined;
1295
1575
  course?: string | undefined;
1576
+ }>, {
1577
+ prompt: string;
1578
+ id: string;
1579
+ questionType: "sequence";
1580
+ items: {
1581
+ id: string;
1582
+ content: string;
1583
+ }[];
1584
+ correctOrder: string[];
1585
+ learningObjective?: string | undefined;
1586
+ category?: string | undefined;
1587
+ topic?: string | undefined;
1588
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1589
+ bloomLevel?: string | undefined;
1590
+ explanation?: string | undefined;
1591
+ points?: number | undefined;
1592
+ glossary?: string[] | undefined;
1593
+ contextCode?: string | undefined;
1594
+ gradeBand?: string | undefined;
1595
+ course?: string | undefined;
1596
+ }, {
1597
+ prompt: string;
1598
+ id: string;
1599
+ questionType: "sequence";
1600
+ items: {
1601
+ id: string;
1602
+ content: string;
1603
+ }[];
1604
+ correctOrder: string[];
1605
+ learningObjective?: string | undefined;
1606
+ category?: string | undefined;
1607
+ topic?: string | undefined;
1608
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1609
+ bloomLevel?: string | undefined;
1610
+ explanation?: string | undefined;
1611
+ points?: number | undefined;
1612
+ glossary?: string[] | undefined;
1613
+ contextCode?: string | undefined;
1614
+ gradeBand?: string | undefined;
1615
+ course?: string | undefined;
1616
+ }>, {
1617
+ prompt: string;
1618
+ id: string;
1619
+ questionType: "sequence";
1620
+ items: {
1621
+ id: string;
1622
+ content: string;
1623
+ }[];
1624
+ correctOrder: string[];
1625
+ learningObjective?: string | undefined;
1626
+ category?: string | undefined;
1627
+ topic?: string | undefined;
1628
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1629
+ bloomLevel?: string | undefined;
1630
+ explanation?: string | undefined;
1631
+ points?: number | undefined;
1632
+ glossary?: string[] | undefined;
1633
+ contextCode?: string | undefined;
1634
+ gradeBand?: string | undefined;
1635
+ course?: string | undefined;
1636
+ }, {
1637
+ prompt: string;
1638
+ id: string;
1639
+ questionType: "sequence";
1640
+ items: {
1641
+ id: string;
1642
+ content: string;
1643
+ }[];
1644
+ correctOrder: string[];
1645
+ learningObjective?: string | undefined;
1646
+ category?: string | undefined;
1647
+ topic?: string | undefined;
1648
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1649
+ bloomLevel?: string | undefined;
1650
+ explanation?: string | undefined;
1651
+ points?: number | undefined;
1652
+ glossary?: string[] | undefined;
1653
+ contextCode?: string | undefined;
1654
+ gradeBand?: string | undefined;
1655
+ course?: string | undefined;
1656
+ }>, {
1657
+ prompt: string;
1658
+ id: string;
1659
+ questionType: "sequence";
1660
+ items: {
1661
+ id: string;
1662
+ content: string;
1663
+ }[];
1664
+ correctOrder: string[];
1665
+ learningObjective?: string | undefined;
1666
+ category?: string | undefined;
1667
+ topic?: string | undefined;
1668
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1669
+ bloomLevel?: string | undefined;
1670
+ explanation?: string | undefined;
1671
+ points?: number | undefined;
1672
+ glossary?: string[] | undefined;
1673
+ contextCode?: string | undefined;
1674
+ gradeBand?: string | undefined;
1675
+ course?: string | undefined;
1676
+ }, {
1677
+ prompt: string;
1678
+ id: string;
1679
+ questionType: "sequence";
1680
+ items: {
1681
+ id: string;
1682
+ content: string;
1683
+ }[];
1684
+ correctOrder: string[];
1685
+ learningObjective?: string | undefined;
1686
+ category?: string | undefined;
1687
+ topic?: string | undefined;
1688
+ difficulty?: "easy" | "medium" | "hard" | undefined;
1689
+ bloomLevel?: string | undefined;
1690
+ explanation?: string | undefined;
1691
+ points?: number | undefined;
1692
+ glossary?: string[] | undefined;
1693
+ contextCode?: string | undefined;
1694
+ gradeBand?: string | undefined;
1695
+ course?: string | undefined;
1296
1696
  }>>;
1297
1697
  }, "strip", z.ZodTypeAny, {
1298
1698
  question?: {
@@ -1340,10 +1740,11 @@ declare const GenerateSequenceQuestionOutputSchema: z.ZodObject<{
1340
1740
  } | undefined;
1341
1741
  }>;
1342
1742
  type GenerateSequenceQuestionOutput = z.infer<typeof GenerateSequenceQuestionOutputSchema>;
1343
- declare function generateSequenceQuestion(input: GenerateSequenceQuestionInput): Promise<GenerateSequenceQuestionOutput>;
1743
+ declare function generateSequenceQuestion(clientInput: GenerateSequenceQuestionClientInput, apiKey: string): Promise<GenerateSequenceQuestionOutput>;
1344
1744
 
1345
- declare const GenerateShortAnswerQuestionInputSchema: z.ZodObject<{
1745
+ declare const GenerateShortAnswerQuestionClientInputSchema: z.ZodObject<{
1346
1746
  topic: z.ZodString;
1747
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1347
1748
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
1348
1749
  isCaseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1349
1750
  contextDescription: z.ZodOptional<z.ZodString>;
@@ -1351,17 +1752,19 @@ declare const GenerateShortAnswerQuestionInputSchema: z.ZodObject<{
1351
1752
  }, "strip", z.ZodTypeAny, {
1352
1753
  topic: string;
1353
1754
  difficulty: "easy" | "medium" | "hard";
1755
+ language: string;
1354
1756
  isCaseSensitive: boolean;
1355
1757
  contextDescription?: string | undefined;
1356
1758
  selectedContextId?: string | undefined;
1357
1759
  }, {
1358
1760
  topic: string;
1359
1761
  difficulty?: "easy" | "medium" | "hard" | undefined;
1762
+ language?: string | undefined;
1360
1763
  isCaseSensitive?: boolean | undefined;
1361
1764
  contextDescription?: string | undefined;
1362
1765
  selectedContextId?: string | undefined;
1363
1766
  }>;
1364
- type GenerateShortAnswerQuestionInput = z.infer<typeof GenerateShortAnswerQuestionInputSchema>;
1767
+ type GenerateShortAnswerQuestionClientInput = z.infer<typeof GenerateShortAnswerQuestionClientInputSchema>;
1365
1768
  declare const GenerateShortAnswerQuestionOutputSchema: z.ZodObject<{
1366
1769
  question: z.ZodOptional<z.ZodObject<{
1367
1770
  id: z.ZodString;
@@ -1455,25 +1858,28 @@ declare const GenerateShortAnswerQuestionOutputSchema: z.ZodObject<{
1455
1858
  } | undefined;
1456
1859
  }>;
1457
1860
  type GenerateShortAnswerQuestionOutput = z.infer<typeof GenerateShortAnswerQuestionOutputSchema>;
1458
- declare function generateShortAnswerQuestion(input: GenerateShortAnswerQuestionInput): Promise<GenerateShortAnswerQuestionOutput>;
1861
+ declare function generateShortAnswerQuestion(clientInput: GenerateShortAnswerQuestionClientInput, apiKey: string): Promise<GenerateShortAnswerQuestionOutput>;
1459
1862
 
1460
- declare const GenerateTrueFalseQuestionInputSchema: z.ZodObject<{
1863
+ declare const GenerateTrueFalseQuestionClientInputSchema: z.ZodObject<{
1461
1864
  topic: z.ZodString;
1865
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1462
1866
  difficulty: z.ZodDefault<z.ZodOptional<z.ZodEnum<["easy", "medium", "hard"]>>>;
1463
1867
  contextDescription: z.ZodOptional<z.ZodString>;
1464
1868
  selectedContextId: z.ZodOptional<z.ZodString>;
1465
1869
  }, "strip", z.ZodTypeAny, {
1466
1870
  topic: string;
1467
1871
  difficulty: "easy" | "medium" | "hard";
1872
+ language: string;
1468
1873
  contextDescription?: string | undefined;
1469
1874
  selectedContextId?: string | undefined;
1470
1875
  }, {
1471
1876
  topic: string;
1472
1877
  difficulty?: "easy" | "medium" | "hard" | undefined;
1878
+ language?: string | undefined;
1473
1879
  contextDescription?: string | undefined;
1474
1880
  selectedContextId?: string | undefined;
1475
1881
  }>;
1476
- type GenerateTrueFalseQuestionInput = z.infer<typeof GenerateTrueFalseQuestionInputSchema>;
1882
+ type GenerateTrueFalseQuestionClientInput = z.infer<typeof GenerateTrueFalseQuestionClientInputSchema>;
1477
1883
  declare const GenerateTrueFalseQuestionOutputSchema: z.ZodObject<{
1478
1884
  question: z.ZodOptional<z.ZodObject<{
1479
1885
  id: z.ZodString;
@@ -1562,61 +1968,52 @@ declare const GenerateTrueFalseQuestionOutputSchema: z.ZodObject<{
1562
1968
  } | undefined;
1563
1969
  }>;
1564
1970
  type GenerateTrueFalseQuestionOutput = z.infer<typeof GenerateTrueFalseQuestionOutputSchema>;
1565
- declare function generateTrueFalseQuestion(input: GenerateTrueFalseQuestionInput): Promise<GenerateTrueFalseQuestionOutput>;
1971
+ declare function generateTrueFalseQuestion(clientInput: GenerateTrueFalseQuestionClientInput, apiKey: string): Promise<GenerateTrueFalseQuestionOutput>;
1566
1972
 
1567
- declare const GenerateQuestionsFromQuizPlanInputSchema: z.ZodObject<{
1973
+ declare const GenerateQuestionsFromQuizPlanClientInputSchema: z.ZodObject<{
1568
1974
  quizPlan: z.ZodArray<z.ZodObject<{
1569
1975
  plannedTopic: z.ZodString;
1570
- plannedQuestionType: z.ZodEnum<[QuestionTypeStrings, ...QuestionTypeStrings[]]>;
1976
+ plannedQuestionType: z.ZodString;
1571
1977
  plannedBloomLevel: z.ZodEnum<["remembering", "understanding", "applying"]>;
1978
+ plannedContextId: z.ZodOptional<z.ZodString>;
1572
1979
  }, "strip", z.ZodTypeAny, {
1573
1980
  plannedTopic: string;
1574
- plannedQuestionType: QuestionTypeStrings;
1981
+ plannedQuestionType: string;
1575
1982
  plannedBloomLevel: "remembering" | "understanding" | "applying";
1983
+ plannedContextId?: string | undefined;
1576
1984
  }, {
1577
1985
  plannedTopic: string;
1578
- plannedQuestionType: QuestionTypeStrings;
1986
+ plannedQuestionType: string;
1579
1987
  plannedBloomLevel: "remembering" | "understanding" | "applying";
1988
+ plannedContextId?: string | undefined;
1580
1989
  }>, "many">;
1990
+ language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
1581
1991
  selectedContextIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1582
1992
  customContextInput: z.ZodOptional<z.ZodString>;
1583
1993
  }, "strip", z.ZodTypeAny, {
1994
+ language: string;
1584
1995
  quizPlan: {
1585
1996
  plannedTopic: string;
1586
- plannedQuestionType: QuestionTypeStrings;
1997
+ plannedQuestionType: string;
1587
1998
  plannedBloomLevel: "remembering" | "understanding" | "applying";
1999
+ plannedContextId?: string | undefined;
1588
2000
  }[];
1589
2001
  selectedContextIds?: string[] | undefined;
1590
2002
  customContextInput?: string | undefined;
1591
2003
  }, {
1592
2004
  quizPlan: {
1593
2005
  plannedTopic: string;
1594
- plannedQuestionType: QuestionTypeStrings;
2006
+ plannedQuestionType: string;
1595
2007
  plannedBloomLevel: "remembering" | "understanding" | "applying";
2008
+ plannedContextId?: string | undefined;
1596
2009
  }[];
2010
+ language?: string | undefined;
1597
2011
  selectedContextIds?: string[] | undefined;
1598
2012
  customContextInput?: string | undefined;
1599
2013
  }>;
1600
- type GenerateQuestionsFromQuizPlanInput = z.infer<typeof GenerateQuestionsFromQuizPlanInputSchema>;
1601
- declare const GenerationErrorSchema: z.ZodObject<{
1602
- plannedQuestionIndex: z.ZodNumber;
1603
- plannedTopic: z.ZodString;
1604
- plannedQuestionType: z.ZodString;
1605
- error: z.ZodString;
1606
- }, "strip", z.ZodTypeAny, {
1607
- error: string;
1608
- plannedTopic: string;
1609
- plannedQuestionType: string;
1610
- plannedQuestionIndex: number;
1611
- }, {
1612
- error: string;
1613
- plannedTopic: string;
1614
- plannedQuestionType: string;
1615
- plannedQuestionIndex: number;
1616
- }>;
1617
- type GenerationError = z.infer<typeof GenerationErrorSchema>;
2014
+ type GenerateQuestionsFromQuizPlanClientInput = z.infer<typeof GenerateQuestionsFromQuizPlanClientInputSchema>;
1618
2015
  declare const GenerateQuestionsFromQuizPlanOutputSchema: z.ZodObject<{
1619
- generatedQuestions: z.ZodArray<z.ZodType<QuizQuestion, z.ZodTypeDef, QuizQuestion>, "many">;
2016
+ generatedQuestions: z.ZodArray<z.ZodAny, "many">;
1620
2017
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1621
2018
  plannedQuestionIndex: z.ZodNumber;
1622
2019
  plannedTopic: z.ZodString;
@@ -1634,7 +2031,7 @@ declare const GenerateQuestionsFromQuizPlanOutputSchema: z.ZodObject<{
1634
2031
  plannedQuestionIndex: number;
1635
2032
  }>, "many">>;
1636
2033
  }, "strip", z.ZodTypeAny, {
1637
- generatedQuestions: QuizQuestion[];
2034
+ generatedQuestions: any[];
1638
2035
  errors?: {
1639
2036
  error: string;
1640
2037
  plannedTopic: string;
@@ -1642,7 +2039,7 @@ declare const GenerateQuestionsFromQuizPlanOutputSchema: z.ZodObject<{
1642
2039
  plannedQuestionIndex: number;
1643
2040
  }[] | undefined;
1644
2041
  }, {
1645
- generatedQuestions: QuizQuestion[];
2042
+ generatedQuestions: any[];
1646
2043
  errors?: {
1647
2044
  error: string;
1648
2045
  plannedTopic: string;
@@ -1651,7 +2048,7 @@ declare const GenerateQuestionsFromQuizPlanOutputSchema: z.ZodObject<{
1651
2048
  }[] | undefined;
1652
2049
  }>;
1653
2050
  type GenerateQuestionsFromQuizPlanOutput = z.infer<typeof GenerateQuestionsFromQuizPlanOutputSchema>;
1654
- declare function generateQuestionsFromQuizPlan(input: GenerateQuestionsFromQuizPlanInput): Promise<GenerateQuestionsFromQuizPlanOutput>;
2051
+ declare function generateQuestionsFromQuizPlan(clientInput: GenerateQuestionsFromQuizPlanClientInput, apiKey: string): Promise<GenerateQuestionsFromQuizPlanOutput>;
1655
2052
 
1656
2053
  /**
1657
2054
  * Generates a simple unique ID.
@@ -1662,4 +2059,4 @@ declare function generateUniqueId(prefix?: string): string;
1662
2059
 
1663
2060
  declare function cn(...inputs: ClassValue[]): string;
1664
2061
 
1665
- export { type BaseQuestion, type BlocklyProgrammingQuestion, type BloomLevelStringsForAI, type DragAndDropQuestion, type DraggableItem, type DropZone, type FillInTheBlanksQuestion, type GenerateFillInTheBlanksQuestionInput, type GenerateFillInTheBlanksQuestionOutput, type GenerateMCQQuestionInput, type GenerateMCQQuestionOutput, type GenerateMRQQuestionInput, type GenerateMRQQuestionOutput, type GenerateMatchingQuestionInput, type GenerateMatchingQuestionOutput, type GenerateNumericQuestionInput, type GenerateNumericQuestionOutput, type GenerateQuestionsFromQuizPlanInput, type GenerateQuestionsFromQuizPlanOutput, type GenerateQuizPlanInput, type GenerateQuizPlanOutput, type GenerateSequenceQuestionInput, type GenerateSequenceQuestionOutput, type GenerateShortAnswerQuestionInput, type GenerateShortAnswerQuestionOutput, type GenerateTrueFalseQuestionInput, type GenerateTrueFalseQuestionOutput, type GenerationError, type HotspotArea, type HotspotQuestion, type MatchOptionItem, type MatchPromptItem, type MatchingQuestion, type MultipleChoiceQuestion, type MultipleResponseQuestion, type NumericQuestion, type PerformanceByBloomLevel, type PerformanceByCategory, type PerformanceByDifficulty, type PerformanceByLearningObjective, type PerformanceByTopic, type PerformanceMetric, type PlannedQuestion, type QuestionOption, type QuestionTypeStrings, type QuizConfig, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, type QuizQuestion, type QuizResult, type QuizSettings, SCORMService, type SCORMSettings, type ScratchProgrammingQuestion, type SequenceItem, type SequenceQuestion, type ShortAnswerQuestion, type TrueFalseQuestion, type UserAnswerType, type UserAnswers, cn, emptyQuiz, exportQuizAsSCORMZip, generateFillInTheBlanksQuestion, generateLauncherHTML, generateMCQQuestion, generateMRQQuestion, generateMatchingQuestion, generateNumericQuestion, generateQuestionsFromQuizPlan, generateQuizPlan, generateSCORMManifest, generateSequenceQuestion, generateShortAnswerQuestion, generateTrueFalseQuestion, generateUniqueId, sampleQuiz };
2062
+ export { APIKeyService, type BaseQuestion, type BlocklyProgrammingQuestion, type BloomLevelStringsForAI, type DragAndDropQuestion, type DraggableItem, type DropZone, type FillInTheBlanksQuestion, GEMINI_API_KEY_SERVICE_NAME, type GenerateFillInTheBlanksQuestionClientInput, type GenerateFillInTheBlanksQuestionOutput, type GenerateMCQQuestionClientInput, type GenerateMCQQuestionOutput, type GenerateMRQQuestionClientInput, type GenerateMRQQuestionOutput, type GenerateMatchingQuestionClientInput, type GenerateMatchingQuestionOutput, type GenerateNumericQuestionClientInput, type GenerateNumericQuestionOutput, type GenerateQuestionsFromQuizPlanClientInput, type GenerateQuestionsFromQuizPlanOutput, type GenerateQuizPlanClientInput, type GenerateQuizPlanOutput, type GenerateSequenceQuestionClientInput, type GenerateSequenceQuestionOutput, type GenerateShortAnswerQuestionClientInput, type GenerateShortAnswerQuestionOutput, type GenerateTrueFalseQuestionClientInput, type GenerateTrueFalseQuestionOutput, type HotspotArea, type HotspotQuestion, type ImportError, type MarkdownString, type MatchOptionItem, type MatchPromptItem, type MatchingQuestion, type MultipleChoiceQuestion, type MultipleResponseQuestion, type NumericQuestion, type PerformanceByBloomLevel, type PerformanceByCategory, type PerformanceByDifficulty, type PerformanceByLearningObjective, type PerformanceByTopic, type PerformanceMetric, type PlannedQuestion, type QuestionOption, type QuestionTypeStrings, type QuizConfig, QuizEditorService, QuizEngine, type QuizEngineCallbacks, type QuizEngineConstructorOptions, type QuizQuestion, type QuizResult, type QuizSettings, type RichContentString, SCORMService, type SCORMSettings, type ScratchProgrammingQuestion, type SequenceItem, type SequenceQuestion, type ShortAnswerQuestion, type TrueFalseQuestion, type UserAnswerType, type UserAnswers, cn, emptyQuiz, exportQuizAsSCORMZip, generateFillInTheBlanksQuestion, generateLauncherHTML, generateMCQQuestion, generateMRQQuestion, generateMatchingQuestion, generateNumericQuestion, generateQuestionsFromQuizPlan, generateQuizPlan, generateSCORMManifest, generateSequenceQuestion, generateShortAnswerQuestion, generateTrueFalseQuestion, generateUniqueId, sampleQuiz };