academe-kit 0.3.7 → 0.3.9

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.
@@ -542,6 +542,223 @@ export interface paths {
542
542
  };
543
543
  trace?: never;
544
544
  };
545
+ "/certificate-templates": {
546
+ parameters: {
547
+ query?: never;
548
+ header?: never;
549
+ path?: never;
550
+ cookie?: never;
551
+ };
552
+ /**
553
+ * List all certificate templates
554
+ * @description Retrieve a list of all certificate templates with optional filtering
555
+ */
556
+ get: {
557
+ parameters: {
558
+ query?: {
559
+ /** @description Filter by template name */
560
+ name?: string;
561
+ /** @description Filter by default template */
562
+ isDefault?: boolean;
563
+ /** @description Filter by active status */
564
+ isActive?: boolean;
565
+ /** @description Filter by quiz ID */
566
+ quizId?: string;
567
+ /** @description Filter by course ID */
568
+ courseId?: string;
569
+ /** @description Filter by organization ID */
570
+ organizationId?: string;
571
+ /** @description Filter by institution ID */
572
+ institutionId?: string;
573
+ /** @description Search in template name */
574
+ search?: string;
575
+ /** @description Page number */
576
+ page?: number;
577
+ /** @description Items per page */
578
+ limit?: number;
579
+ };
580
+ header?: never;
581
+ path?: never;
582
+ cookie?: never;
583
+ };
584
+ requestBody?: never;
585
+ responses: {
586
+ /** @description List of certificate templates */
587
+ 200: {
588
+ headers: {
589
+ [name: string]: unknown;
590
+ };
591
+ content: {
592
+ "application/json": {
593
+ /** @example success */
594
+ status?: string;
595
+ data?: components["schemas"]["CertificateTemplate"][];
596
+ meta?: components["schemas"]["PaginationMeta"];
597
+ };
598
+ };
599
+ };
600
+ 401: components["responses"]["Unauthorized"];
601
+ 500: components["responses"]["ServerError"];
602
+ };
603
+ };
604
+ put?: never;
605
+ /**
606
+ * Create a new certificate template
607
+ * @description Create a new template for certificates
608
+ */
609
+ post: {
610
+ parameters: {
611
+ query?: never;
612
+ header?: never;
613
+ path?: never;
614
+ cookie?: never;
615
+ };
616
+ requestBody: {
617
+ content: {
618
+ "application/json": components["schemas"]["CreateCertificateTemplateDto"];
619
+ };
620
+ };
621
+ responses: {
622
+ /** @description Certificate template created successfully */
623
+ 201: {
624
+ headers: {
625
+ [name: string]: unknown;
626
+ };
627
+ content: {
628
+ "application/json": {
629
+ /** @example success */
630
+ status?: string;
631
+ data?: components["schemas"]["CertificateTemplate"];
632
+ };
633
+ };
634
+ };
635
+ 400: components["responses"]["BadRequest"];
636
+ 401: components["responses"]["Unauthorized"];
637
+ 500: components["responses"]["ServerError"];
638
+ };
639
+ };
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
646
+ "/certificate-templates/{id}": {
647
+ parameters: {
648
+ query?: never;
649
+ header?: never;
650
+ path?: never;
651
+ cookie?: never;
652
+ };
653
+ /**
654
+ * Get certificate template by ID
655
+ * @description Retrieve detailed information about a specific certificate template
656
+ */
657
+ get: {
658
+ parameters: {
659
+ query?: never;
660
+ header?: never;
661
+ path: {
662
+ /** @description Resource ID */
663
+ id: components["parameters"]["id"];
664
+ };
665
+ cookie?: never;
666
+ };
667
+ requestBody?: never;
668
+ responses: {
669
+ /** @description Certificate template information */
670
+ 200: {
671
+ headers: {
672
+ [name: string]: unknown;
673
+ };
674
+ content: {
675
+ "application/json": {
676
+ /** @example success */
677
+ status?: string;
678
+ data?: components["schemas"]["CertificateTemplate"];
679
+ };
680
+ };
681
+ };
682
+ 400: components["responses"]["BadRequest"];
683
+ 401: components["responses"]["Unauthorized"];
684
+ 404: components["responses"]["NotFound"];
685
+ 500: components["responses"]["ServerError"];
686
+ };
687
+ };
688
+ put?: never;
689
+ post?: never;
690
+ /**
691
+ * Delete certificate template
692
+ * @description Remove a certificate template from the system
693
+ */
694
+ delete: {
695
+ parameters: {
696
+ query?: never;
697
+ header?: never;
698
+ path: {
699
+ /** @description Resource ID */
700
+ id: components["parameters"]["id"];
701
+ };
702
+ cookie?: never;
703
+ };
704
+ requestBody?: never;
705
+ responses: {
706
+ /** @description Certificate template deleted successfully */
707
+ 204: {
708
+ headers: {
709
+ [name: string]: unknown;
710
+ };
711
+ content?: never;
712
+ };
713
+ 400: components["responses"]["BadRequest"];
714
+ 401: components["responses"]["Unauthorized"];
715
+ 404: components["responses"]["NotFound"];
716
+ 500: components["responses"]["ServerError"];
717
+ };
718
+ };
719
+ options?: never;
720
+ head?: never;
721
+ /**
722
+ * Update certificate template
723
+ * @description Update certificate template information
724
+ */
725
+ patch: {
726
+ parameters: {
727
+ query?: never;
728
+ header?: never;
729
+ path: {
730
+ /** @description Resource ID */
731
+ id: components["parameters"]["id"];
732
+ };
733
+ cookie?: never;
734
+ };
735
+ requestBody: {
736
+ content: {
737
+ "application/json": components["schemas"]["UpdateCertificateTemplateDto"];
738
+ };
739
+ };
740
+ responses: {
741
+ /** @description Certificate template updated successfully */
742
+ 200: {
743
+ headers: {
744
+ [name: string]: unknown;
745
+ };
746
+ content: {
747
+ "application/json": {
748
+ /** @example success */
749
+ status?: string;
750
+ data?: components["schemas"]["CertificateTemplate"];
751
+ };
752
+ };
753
+ };
754
+ 400: components["responses"]["BadRequest"];
755
+ 401: components["responses"]["Unauthorized"];
756
+ 404: components["responses"]["NotFound"];
757
+ 500: components["responses"]["ServerError"];
758
+ };
759
+ };
760
+ trace?: never;
761
+ };
545
762
  "/certificates": {
546
763
  parameters: {
547
764
  query?: never;
@@ -2561,6 +2778,91 @@ export interface paths {
2561
2778
  patch?: never;
2562
2779
  trace?: never;
2563
2780
  };
2781
+ "/institutions/seat-code/{seatCodeId}/classrooms": {
2782
+ parameters: {
2783
+ query?: never;
2784
+ header?: never;
2785
+ path?: never;
2786
+ cookie?: never;
2787
+ };
2788
+ /**
2789
+ * List classrooms by seat code (public)
2790
+ * @description Public endpoint to retrieve classrooms associated with an institution via seat code.
2791
+ * This endpoint validates that:
2792
+ * - The seat code exists
2793
+ * - The seat code is not reserved
2794
+ * - The seat code has not been used (no institution_registration exists)
2795
+ *
2796
+ * If valid, returns all classrooms from the institution associated with the seat code's seat.
2797
+ */
2798
+ get: {
2799
+ parameters: {
2800
+ query?: {
2801
+ /** @description When true, includes a userCount field with the number of users registered in each classroom */
2802
+ includeUserCount?: boolean;
2803
+ };
2804
+ header?: never;
2805
+ path: {
2806
+ /** @description Seat Code ID (must be valid and unused) */
2807
+ seatCodeId: string;
2808
+ };
2809
+ cookie?: never;
2810
+ };
2811
+ requestBody?: never;
2812
+ responses: {
2813
+ /** @description List of institution classrooms */
2814
+ 200: {
2815
+ headers: {
2816
+ [name: string]: unknown;
2817
+ };
2818
+ content: {
2819
+ "application/json": {
2820
+ /** @example success */
2821
+ status?: string;
2822
+ data?: (components["schemas"]["InstitutionClassroom"] & {
2823
+ /**
2824
+ * @description Number of users registered in this classroom (only present when includeUserCount=true)
2825
+ * @example 25
2826
+ */
2827
+ userCount?: number;
2828
+ })[];
2829
+ };
2830
+ };
2831
+ };
2832
+ /**
2833
+ * @description Bad request. Possible causes:
2834
+ * - Seat code not found or already in use
2835
+ * - Seat code is reserved
2836
+ * - Seat code is not associated with an institution
2837
+ */
2838
+ 400: {
2839
+ headers: {
2840
+ [name: string]: unknown;
2841
+ };
2842
+ content: {
2843
+ "application/json": components["schemas"]["Error"];
2844
+ };
2845
+ };
2846
+ /** @description Seat not found for the seat code */
2847
+ 404: {
2848
+ headers: {
2849
+ [name: string]: unknown;
2850
+ };
2851
+ content: {
2852
+ "application/json": components["schemas"]["Error"];
2853
+ };
2854
+ };
2855
+ 500: components["responses"]["ServerError"];
2856
+ };
2857
+ };
2858
+ put?: never;
2859
+ post?: never;
2860
+ delete?: never;
2861
+ options?: never;
2862
+ head?: never;
2863
+ patch?: never;
2864
+ trace?: never;
2865
+ };
2564
2866
  "/institutions/{institutionId}/classrooms": {
2565
2867
  parameters: {
2566
2868
  query?: never;
@@ -2569,7 +2871,7 @@ export interface paths {
2569
2871
  cookie?: never;
2570
2872
  };
2571
2873
  /**
2572
- * List all classrooms of an institution
2874
+ * List all classrooms of an institution (authenticated)
2573
2875
  * @description Retrieve a list of all classrooms associated with a specific institution, including shift and serie information. Optionally includes user count for each classroom.
2574
2876
  */
2575
2877
  get: {
@@ -2779,280 +3081,7 @@ export interface paths {
2779
3081
  };
2780
3082
  trace?: never;
2781
3083
  };
2782
- "/institutions/{institutionId}/groups": {
2783
- parameters: {
2784
- query?: never;
2785
- header?: never;
2786
- path?: never;
2787
- cookie?: never;
2788
- };
2789
- /**
2790
- * List all groups of an institution
2791
- * @description Retrieve a list of all groups associated with a specific institution
2792
- */
2793
- get: {
2794
- parameters: {
2795
- query?: never;
2796
- header?: never;
2797
- path: {
2798
- /** @description Institution ID */
2799
- institutionId: string;
2800
- };
2801
- cookie?: never;
2802
- };
2803
- requestBody?: never;
2804
- responses: {
2805
- /** @description List of institution groups */
2806
- 200: {
2807
- headers: {
2808
- [name: string]: unknown;
2809
- };
2810
- content: {
2811
- "application/json": {
2812
- /** @example success */
2813
- status?: string;
2814
- data?: components["schemas"]["InstitutionGroup"][];
2815
- };
2816
- };
2817
- };
2818
- 401: components["responses"]["Unauthorized"];
2819
- 404: components["responses"]["NotFound"];
2820
- 500: components["responses"]["ServerError"];
2821
- };
2822
- };
2823
- put?: never;
2824
- /**
2825
- * Associate a group with an institution
2826
- * @description Create a new association between a group and an institution
2827
- */
2828
- post: {
2829
- parameters: {
2830
- query?: never;
2831
- header?: never;
2832
- path: {
2833
- /** @description Institution ID */
2834
- institutionId: string;
2835
- };
2836
- cookie?: never;
2837
- };
2838
- requestBody: {
2839
- content: {
2840
- "application/json": components["schemas"]["CreateInstitutionGroupDto"];
2841
- };
2842
- };
2843
- responses: {
2844
- /** @description Group associated successfully */
2845
- 201: {
2846
- headers: {
2847
- [name: string]: unknown;
2848
- };
2849
- content: {
2850
- "application/json": {
2851
- /** @example success */
2852
- status?: string;
2853
- data?: components["schemas"]["InstitutionGroup"];
2854
- };
2855
- };
2856
- };
2857
- 400: components["responses"]["BadRequest"];
2858
- 401: components["responses"]["Unauthorized"];
2859
- 404: components["responses"]["NotFound"];
2860
- 409: components["responses"]["Conflict"];
2861
- 500: components["responses"]["ServerError"];
2862
- };
2863
- };
2864
- delete?: never;
2865
- options?: never;
2866
- head?: never;
2867
- patch?: never;
2868
- trace?: never;
2869
- };
2870
- "/institutions/{institutionId}/groups/{groupId}": {
2871
- parameters: {
2872
- query?: never;
2873
- header?: never;
2874
- path?: never;
2875
- cookie?: never;
2876
- };
2877
- get?: never;
2878
- put?: never;
2879
- post?: never;
2880
- /**
2881
- * Remove a group from an institution
2882
- * @description Remove the association between a group and an institution
2883
- */
2884
- delete: {
2885
- parameters: {
2886
- query?: never;
2887
- header?: never;
2888
- path: {
2889
- /** @description Institution ID */
2890
- institutionId: string;
2891
- /** @description Group ID */
2892
- groupId: string;
2893
- };
2894
- cookie?: never;
2895
- };
2896
- requestBody?: never;
2897
- responses: {
2898
- /** @description Group removed from institution successfully */
2899
- 204: {
2900
- headers: {
2901
- [name: string]: unknown;
2902
- };
2903
- content?: never;
2904
- };
2905
- 400: components["responses"]["BadRequest"];
2906
- 401: components["responses"]["Unauthorized"];
2907
- 404: components["responses"]["NotFound"];
2908
- 500: components["responses"]["ServerError"];
2909
- };
2910
- };
2911
- options?: never;
2912
- head?: never;
2913
- /**
2914
- * Update institution group quantity
2915
- * @description Update the available quantity for a group in an institution
2916
- */
2917
- patch: {
2918
- parameters: {
2919
- query?: never;
2920
- header?: never;
2921
- path: {
2922
- /** @description Institution ID */
2923
- institutionId: string;
2924
- /** @description Group ID */
2925
- groupId: string;
2926
- };
2927
- cookie?: never;
2928
- };
2929
- requestBody: {
2930
- content: {
2931
- "application/json": components["schemas"]["UpdateInstitutionGroupDto"];
2932
- };
2933
- };
2934
- responses: {
2935
- /** @description Institution group updated successfully */
2936
- 200: {
2937
- headers: {
2938
- [name: string]: unknown;
2939
- };
2940
- content: {
2941
- "application/json": {
2942
- /** @example success */
2943
- status?: string;
2944
- data?: components["schemas"]["InstitutionGroup"];
2945
- };
2946
- };
2947
- };
2948
- 400: components["responses"]["BadRequest"];
2949
- 401: components["responses"]["Unauthorized"];
2950
- 404: components["responses"]["NotFound"];
2951
- 500: components["responses"]["ServerError"];
2952
- };
2953
- };
2954
- trace?: never;
2955
- };
2956
- "/institutions/{institutionId}/groups/users": {
2957
- parameters: {
2958
- query?: never;
2959
- header?: never;
2960
- path?: never;
2961
- cookie?: never;
2962
- };
2963
- /**
2964
- * Get all users of all groups in an institution
2965
- * @description Retrieve all users from all groups associated with a specific institution.
2966
- * Returns a map where keys are group IDs and values are arrays of users in each group.
2967
- * This is more efficient than calling /groups/{id}/users multiple times.
2968
- */
2969
- get: {
2970
- parameters: {
2971
- query?: never;
2972
- header?: never;
2973
- path: {
2974
- /** @description Institution ID */
2975
- institutionId: string;
2976
- };
2977
- cookie?: never;
2978
- };
2979
- requestBody?: never;
2980
- responses: {
2981
- /** @description Users grouped by group ID */
2982
- 200: {
2983
- headers: {
2984
- [name: string]: unknown;
2985
- };
2986
- content: {
2987
- /**
2988
- * @example {
2989
- * "status": "success",
2990
- * "data": {
2991
- * "group-uuid-1": [
2992
- * {
2993
- * "id": "user-uuid-1",
2994
- * "firstName": "John",
2995
- * "lastName": "Doe",
2996
- * "email": "john@example.com",
2997
- * "assignedAt": "2024-01-15T10:30:00Z"
2998
- * },
2999
- * {
3000
- * "id": "user-uuid-2",
3001
- * "firstName": "Jane",
3002
- * "lastName": "Smith",
3003
- * "email": "jane@example.com",
3004
- * "assignedAt": "2024-01-16T14:20:00Z"
3005
- * }
3006
- * ],
3007
- * "group-uuid-2": [
3008
- * {
3009
- * "id": "user-uuid-3",
3010
- * "firstName": "Bob",
3011
- * "lastName": "Wilson",
3012
- * "email": "bob@example.com",
3013
- * "assignedAt": "2024-01-17T09:15:00Z"
3014
- * }
3015
- * ]
3016
- * }
3017
- * }
3018
- */
3019
- "application/json": {
3020
- /** @example success */
3021
- status?: string;
3022
- /** @description Map of group IDs to arrays of users */
3023
- data?: {
3024
- [key: string]: {
3025
- /** Format: uuid */
3026
- id?: string;
3027
- firstName?: string;
3028
- lastName?: string;
3029
- email?: string;
3030
- document?: string;
3031
- phone?: string;
3032
- isActive?: boolean;
3033
- /** Format: date-time */
3034
- assignedAt?: string;
3035
- /** Format: uuid */
3036
- assignedBy?: string;
3037
- }[];
3038
- };
3039
- };
3040
- };
3041
- };
3042
- 401: components["responses"]["Unauthorized"];
3043
- 404: components["responses"]["NotFound"];
3044
- 500: components["responses"]["ServerError"];
3045
- };
3046
- };
3047
- put?: never;
3048
- post?: never;
3049
- delete?: never;
3050
- options?: never;
3051
- head?: never;
3052
- patch?: never;
3053
- trace?: never;
3054
- };
3055
- "/institutions/{institutionId}/registrations": {
3084
+ "/institutions/{institutionId}/registrations": {
3056
3085
  parameters: {
3057
3086
  query?: never;
3058
3087
  header?: never;
@@ -3595,7 +3624,12 @@ export interface paths {
3595
3624
  };
3596
3625
  /**
3597
3626
  * List all users from an institution
3598
- * @description Retrieve a paginated list of all users registered in an institution with advanced filtering options
3627
+ * @description Retrieve a paginated list of all users registered in an institution with advanced filtering options.
3628
+ * Each user includes:
3629
+ * - User groups (userGroups) with group details
3630
+ * - User guardians (userGuardians)
3631
+ * - Institution registration details with classroom information
3632
+ * - Certificate count (certificatesCount)
3599
3633
  */
3600
3634
  get: {
3601
3635
  parameters: {
@@ -3612,6 +3646,12 @@ export interface paths {
3612
3646
  hasGuardian?: boolean;
3613
3647
  /** @description Search by email, first name, last name, or full name (case-insensitive) */
3614
3648
  search?: string;
3649
+ /** @description Filter by start date (based on institution_registration table start_date field) */
3650
+ startDate?: string;
3651
+ /** @description Filter by end date (based on institution_registration table end_date field) */
3652
+ endDate?: string;
3653
+ /** @description Filter by seat ID (based on seats table) */
3654
+ seatId?: string;
3615
3655
  /** @description Page number */
3616
3656
  page?: number;
3617
3657
  /** @description Items per page */
@@ -3649,7 +3689,7 @@ export interface paths {
3649
3689
  patch?: never;
3650
3690
  trace?: never;
3651
3691
  };
3652
- "/organizations": {
3692
+ "/institutions/{institutionId}/seat-codes": {
3653
3693
  parameters: {
3654
3694
  query?: never;
3655
3695
  header?: never;
@@ -3657,19 +3697,2115 @@ export interface paths {
3657
3697
  cookie?: never;
3658
3698
  };
3659
3699
  /**
3660
- * List all organizations
3661
- * @description Retrieve a list of all organizations with optional filters
3700
+ * List all seat codes of an institution (paginated)
3701
+ * @description Retrieve a paginated list of all seat codes associated with a specific institution.
3702
+ * Can be filtered by seat ID, status, and search term (code or user name).
3703
+ * Includes institution registration and user information when the code is reserved.
3704
+ */
3705
+ get: {
3706
+ parameters: {
3707
+ query?: {
3708
+ /** @description Filter by seat ID */
3709
+ seatId?: string;
3710
+ /** @description Search by code or user name (first name or last name) */
3711
+ search?: string;
3712
+ /**
3713
+ * @description Filter by license status:
3714
+ * - reserved: Code is reserved (isReserved = true)
3715
+ * - active: Code has an associated institution registration (user assigned)
3716
+ * - available: Code is not reserved and has no user assigned
3717
+ */
3718
+ status?: "reserved" | "active" | "available";
3719
+ /** @description Page number */
3720
+ page?: number;
3721
+ /** @description Number of items per page */
3722
+ limit?: number;
3723
+ };
3724
+ header?: never;
3725
+ path: {
3726
+ /** @description Institution ID */
3727
+ institutionId: string;
3728
+ };
3729
+ cookie?: never;
3730
+ };
3731
+ requestBody?: never;
3732
+ responses: {
3733
+ /** @description Paginated list of seat codes */
3734
+ 200: {
3735
+ headers: {
3736
+ [name: string]: unknown;
3737
+ };
3738
+ content: {
3739
+ "application/json": {
3740
+ /** @example success */
3741
+ status?: string;
3742
+ data?: components["schemas"]["SeatCode"][];
3743
+ meta?: {
3744
+ /** @description Total number of items */
3745
+ total?: number;
3746
+ /** @description Current page number */
3747
+ page?: number;
3748
+ /** @description Items per page */
3749
+ limit?: number;
3750
+ /** @description Total number of pages */
3751
+ totalPages?: number;
3752
+ };
3753
+ };
3754
+ };
3755
+ };
3756
+ 401: components["responses"]["Unauthorized"];
3757
+ 404: components["responses"]["NotFound"];
3758
+ 500: components["responses"]["ServerError"];
3759
+ };
3760
+ };
3761
+ put?: never;
3762
+ /**
3763
+ * Generate seat codes for a seat
3764
+ * @description Generate multiple unique seat codes for a specific seat in the institution
3765
+ */
3766
+ post: {
3767
+ parameters: {
3768
+ query?: never;
3769
+ header?: never;
3770
+ path: {
3771
+ /** @description Institution ID */
3772
+ institutionId: string;
3773
+ };
3774
+ cookie?: never;
3775
+ };
3776
+ requestBody: {
3777
+ content: {
3778
+ "application/json": components["schemas"]["CreateSeatCodesDto"];
3779
+ };
3780
+ };
3781
+ responses: {
3782
+ /** @description Seat codes generated successfully */
3783
+ 201: {
3784
+ headers: {
3785
+ [name: string]: unknown;
3786
+ };
3787
+ content: {
3788
+ "application/json": {
3789
+ /** @example success */
3790
+ status?: string;
3791
+ data?: components["schemas"]["SeatCode"][];
3792
+ };
3793
+ };
3794
+ };
3795
+ 400: components["responses"]["BadRequest"];
3796
+ 401: components["responses"]["Unauthorized"];
3797
+ 404: components["responses"]["NotFound"];
3798
+ 500: components["responses"]["ServerError"];
3799
+ };
3800
+ };
3801
+ delete?: never;
3802
+ options?: never;
3803
+ head?: never;
3804
+ patch?: never;
3805
+ trace?: never;
3806
+ };
3807
+ "/institutions/{institutionId}/seats/{seatId}/codes": {
3808
+ parameters: {
3809
+ query?: never;
3810
+ header?: never;
3811
+ path?: never;
3812
+ cookie?: never;
3813
+ };
3814
+ /**
3815
+ * List all codes for a specific seat
3816
+ * @description Retrieve all seat codes for a specific seat in the institution
3817
+ */
3818
+ get: {
3819
+ parameters: {
3820
+ query?: never;
3821
+ header?: never;
3822
+ path: {
3823
+ /** @description Institution ID */
3824
+ institutionId: string;
3825
+ /** @description Seat ID */
3826
+ seatId: string;
3827
+ };
3828
+ cookie?: never;
3829
+ };
3830
+ requestBody?: never;
3831
+ responses: {
3832
+ /** @description List of seat codes */
3833
+ 200: {
3834
+ headers: {
3835
+ [name: string]: unknown;
3836
+ };
3837
+ content: {
3838
+ "application/json": {
3839
+ /** @example success */
3840
+ status?: string;
3841
+ data?: components["schemas"]["SeatCode"][];
3842
+ };
3843
+ };
3844
+ };
3845
+ 401: components["responses"]["Unauthorized"];
3846
+ 404: components["responses"]["NotFound"];
3847
+ 500: components["responses"]["ServerError"];
3848
+ };
3849
+ };
3850
+ put?: never;
3851
+ post?: never;
3852
+ /**
3853
+ * Delete all codes for a seat
3854
+ * @description Delete all seat codes for a specific seat. Cannot delete if any codes are reserved.
3855
+ */
3856
+ delete: {
3857
+ parameters: {
3858
+ query?: never;
3859
+ header?: never;
3860
+ path: {
3861
+ /** @description Institution ID */
3862
+ institutionId: string;
3863
+ /** @description Seat ID */
3864
+ seatId: string;
3865
+ };
3866
+ cookie?: never;
3867
+ };
3868
+ requestBody?: never;
3869
+ responses: {
3870
+ /** @description Seat codes deleted successfully */
3871
+ 200: {
3872
+ headers: {
3873
+ [name: string]: unknown;
3874
+ };
3875
+ content: {
3876
+ "application/json": {
3877
+ /** @example success */
3878
+ status?: string;
3879
+ data?: {
3880
+ /** @description Number of codes deleted */
3881
+ deletedCount?: number;
3882
+ };
3883
+ };
3884
+ };
3885
+ };
3886
+ 400: components["responses"]["BadRequest"];
3887
+ 401: components["responses"]["Unauthorized"];
3888
+ 404: components["responses"]["NotFound"];
3889
+ 500: components["responses"]["ServerError"];
3890
+ };
3891
+ };
3892
+ options?: never;
3893
+ head?: never;
3894
+ patch?: never;
3895
+ trace?: never;
3896
+ };
3897
+ "/institutions/{institutionId}/seats/{seatId}/codes/available": {
3898
+ parameters: {
3899
+ query?: never;
3900
+ header?: never;
3901
+ path?: never;
3902
+ cookie?: never;
3903
+ };
3904
+ /**
3905
+ * List available codes for a specific seat
3906
+ * @description Retrieve all available (not reserved) seat codes for a specific seat
3907
+ */
3908
+ get: {
3909
+ parameters: {
3910
+ query?: never;
3911
+ header?: never;
3912
+ path: {
3913
+ /** @description Institution ID */
3914
+ institutionId: string;
3915
+ /** @description Seat ID */
3916
+ seatId: string;
3917
+ };
3918
+ cookie?: never;
3919
+ };
3920
+ requestBody?: never;
3921
+ responses: {
3922
+ /** @description List of available seat codes */
3923
+ 200: {
3924
+ headers: {
3925
+ [name: string]: unknown;
3926
+ };
3927
+ content: {
3928
+ "application/json": {
3929
+ /** @example success */
3930
+ status?: string;
3931
+ data?: components["schemas"]["SeatCode"][];
3932
+ };
3933
+ };
3934
+ };
3935
+ 401: components["responses"]["Unauthorized"];
3936
+ 404: components["responses"]["NotFound"];
3937
+ 500: components["responses"]["ServerError"];
3938
+ };
3939
+ };
3940
+ put?: never;
3941
+ post?: never;
3942
+ delete?: never;
3943
+ options?: never;
3944
+ head?: never;
3945
+ patch?: never;
3946
+ trace?: never;
3947
+ };
3948
+ "/institutions/{institutionId}/seat-codes/{seatCodeId}": {
3949
+ parameters: {
3950
+ query?: never;
3951
+ header?: never;
3952
+ path?: never;
3953
+ cookie?: never;
3954
+ };
3955
+ /**
3956
+ * Get a specific seat code
3957
+ * @description Retrieve details of a specific seat code
3958
+ */
3959
+ get: {
3960
+ parameters: {
3961
+ query?: never;
3962
+ header?: never;
3963
+ path: {
3964
+ /** @description Institution ID */
3965
+ institutionId: string;
3966
+ /** @description Seat Code ID */
3967
+ seatCodeId: string;
3968
+ };
3969
+ cookie?: never;
3970
+ };
3971
+ requestBody?: never;
3972
+ responses: {
3973
+ /** @description Seat code details */
3974
+ 200: {
3975
+ headers: {
3976
+ [name: string]: unknown;
3977
+ };
3978
+ content: {
3979
+ "application/json": {
3980
+ /** @example success */
3981
+ status?: string;
3982
+ data?: components["schemas"]["SeatCode"];
3983
+ };
3984
+ };
3985
+ };
3986
+ 401: components["responses"]["Unauthorized"];
3987
+ 404: components["responses"]["NotFound"];
3988
+ 500: components["responses"]["ServerError"];
3989
+ };
3990
+ };
3991
+ put?: never;
3992
+ post?: never;
3993
+ /**
3994
+ * Delete a seat code
3995
+ * @description Delete a specific seat code. Cannot delete reserved codes.
3996
+ */
3997
+ delete: {
3998
+ parameters: {
3999
+ query?: never;
4000
+ header?: never;
4001
+ path: {
4002
+ /** @description Institution ID */
4003
+ institutionId: string;
4004
+ /** @description Seat Code ID */
4005
+ seatCodeId: string;
4006
+ };
4007
+ cookie?: never;
4008
+ };
4009
+ requestBody?: never;
4010
+ responses: {
4011
+ /** @description Seat code deleted successfully */
4012
+ 204: {
4013
+ headers: {
4014
+ [name: string]: unknown;
4015
+ };
4016
+ content?: never;
4017
+ };
4018
+ 400: components["responses"]["BadRequest"];
4019
+ 401: components["responses"]["Unauthorized"];
4020
+ 404: components["responses"]["NotFound"];
4021
+ 500: components["responses"]["ServerError"];
4022
+ };
4023
+ };
4024
+ options?: never;
4025
+ head?: never;
4026
+ /**
4027
+ * Update a seat code
4028
+ * @description Update the reservation status of a seat code
4029
+ */
4030
+ patch: {
4031
+ parameters: {
4032
+ query?: never;
4033
+ header?: never;
4034
+ path: {
4035
+ /** @description Institution ID */
4036
+ institutionId: string;
4037
+ /** @description Seat Code ID */
4038
+ seatCodeId: string;
4039
+ };
4040
+ cookie?: never;
4041
+ };
4042
+ requestBody: {
4043
+ content: {
4044
+ "application/json": components["schemas"]["UpdateSeatCodeDto"];
4045
+ };
4046
+ };
4047
+ responses: {
4048
+ /** @description Seat code updated successfully */
4049
+ 200: {
4050
+ headers: {
4051
+ [name: string]: unknown;
4052
+ };
4053
+ content: {
4054
+ "application/json": {
4055
+ /** @example success */
4056
+ status?: string;
4057
+ data?: components["schemas"]["SeatCode"];
4058
+ };
4059
+ };
4060
+ };
4061
+ 400: components["responses"]["BadRequest"];
4062
+ 401: components["responses"]["Unauthorized"];
4063
+ 404: components["responses"]["NotFound"];
4064
+ 500: components["responses"]["ServerError"];
4065
+ };
4066
+ };
4067
+ trace?: never;
4068
+ };
4069
+ "/seat-codes/validate/{code}": {
4070
+ parameters: {
4071
+ query?: never;
4072
+ header?: never;
4073
+ path?: never;
4074
+ cookie?: never;
4075
+ };
4076
+ /**
4077
+ * Validate and get seat code by code string
4078
+ * @description Retrieve seat code details by the code string. Useful for validating codes during registration.
4079
+ * Returns the seat code with the seat and institution data included.
4080
+ */
4081
+ get: {
4082
+ parameters: {
4083
+ query?: never;
4084
+ header?: never;
4085
+ path: {
4086
+ /** @description The seat code string */
4087
+ code: string;
4088
+ };
4089
+ cookie?: never;
4090
+ };
4091
+ requestBody?: never;
4092
+ responses: {
4093
+ /** @description Seat code details with seat and institution */
4094
+ 200: {
4095
+ headers: {
4096
+ [name: string]: unknown;
4097
+ };
4098
+ content: {
4099
+ "application/json": {
4100
+ /** @example success */
4101
+ status?: string;
4102
+ data?: components["schemas"]["SeatCodeWithInstitution"];
4103
+ };
4104
+ };
4105
+ };
4106
+ 401: components["responses"]["Unauthorized"];
4107
+ 404: components["responses"]["NotFound"];
4108
+ 500: components["responses"]["ServerError"];
4109
+ };
4110
+ };
4111
+ put?: never;
4112
+ post?: never;
4113
+ delete?: never;
4114
+ options?: never;
4115
+ head?: never;
4116
+ patch?: never;
4117
+ trace?: never;
4118
+ };
4119
+ "/seat-codes/reserve/{code}": {
4120
+ parameters: {
4121
+ query?: never;
4122
+ header?: never;
4123
+ path?: never;
4124
+ cookie?: never;
4125
+ };
4126
+ get?: never;
4127
+ put?: never;
4128
+ /**
4129
+ * Reserve a seat code
4130
+ * @description Reserve a seat code by marking it as reserved (isReserved = true).
4131
+ * The code must exist and not be already reserved.
4132
+ * Returns the updated seat code with seat, group, and institution data included.
4133
+ */
4134
+ post: {
4135
+ parameters: {
4136
+ query?: never;
4137
+ header?: never;
4138
+ path: {
4139
+ /** @description The seat code string to reserve */
4140
+ code: string;
4141
+ };
4142
+ cookie?: never;
4143
+ };
4144
+ requestBody?: never;
4145
+ responses: {
4146
+ /** @description Seat code reserved successfully */
4147
+ 200: {
4148
+ headers: {
4149
+ [name: string]: unknown;
4150
+ };
4151
+ content: {
4152
+ "application/json": {
4153
+ /** @example success */
4154
+ status?: string;
4155
+ data?: components["schemas"]["SeatCodeWithInstitution"];
4156
+ };
4157
+ };
4158
+ };
4159
+ 401: components["responses"]["Unauthorized"];
4160
+ 404: components["responses"]["NotFound"];
4161
+ /** @description Seat code is already reserved */
4162
+ 409: {
4163
+ headers: {
4164
+ [name: string]: unknown;
4165
+ };
4166
+ content: {
4167
+ "application/json": {
4168
+ /** @example error */
4169
+ status?: string;
4170
+ /** @example Seat code is already reserved */
4171
+ message?: string;
4172
+ };
4173
+ };
4174
+ };
4175
+ 500: components["responses"]["ServerError"];
4176
+ };
4177
+ };
4178
+ delete?: never;
4179
+ options?: never;
4180
+ head?: never;
4181
+ patch?: never;
4182
+ trace?: never;
4183
+ };
4184
+ "/seat-codes/send-code": {
4185
+ parameters: {
4186
+ query?: never;
4187
+ header?: never;
4188
+ path?: never;
4189
+ cookie?: never;
4190
+ };
4191
+ get?: never;
4192
+ put?: never;
4193
+ /**
4194
+ * Send license link via WhatsApp
4195
+ * @description Reserve a seat code and send the dashboard link via WhatsApp webhook.
4196
+ * The link format is: DASHBOARD_URL/register?code={code}
4197
+ * Requires WEBHOOK_LICENSE_RELEASE_URL and DASHBOARD_URL environment variables to be configured.
4198
+ *
4199
+ * The code can be provided in the request body. If not provided, you must provide a seatId
4200
+ * in the request body to automatically find an available code from that seat.
4201
+ */
4202
+ post: {
4203
+ parameters: {
4204
+ query?: never;
4205
+ header?: never;
4206
+ path?: never;
4207
+ cookie?: never;
4208
+ };
4209
+ requestBody: {
4210
+ content: {
4211
+ /**
4212
+ * @example {
4213
+ * "phone": "+5511999999999",
4214
+ * "name": "John Doe",
4215
+ * "code": "ABC123",
4216
+ * "seatId": "550e8400-e29b-41d4-a716-446655440000"
4217
+ * }
4218
+ */
4219
+ "application/json": components["schemas"]["SendCodeDto"];
4220
+ };
4221
+ };
4222
+ responses: {
4223
+ /** @description License link sent successfully via WhatsApp */
4224
+ 200: {
4225
+ headers: {
4226
+ [name: string]: unknown;
4227
+ };
4228
+ content: {
4229
+ "application/json": {
4230
+ /** @example success */
4231
+ status?: string;
4232
+ data?: components["schemas"]["SeatCodeWithInstitution"];
4233
+ };
4234
+ };
4235
+ };
4236
+ /** @description Bad request (missing phone, webhook not configured, or webhook call failed) */
4237
+ 400: {
4238
+ headers: {
4239
+ [name: string]: unknown;
4240
+ };
4241
+ content: {
4242
+ "application/json": {
4243
+ /** @example error */
4244
+ status?: string;
4245
+ /** @example Phone number is required */
4246
+ message?: string;
4247
+ };
4248
+ };
4249
+ };
4250
+ 401: components["responses"]["Unauthorized"];
4251
+ 404: components["responses"]["NotFound"];
4252
+ /** @description Seat code is already reserved */
4253
+ 409: {
4254
+ headers: {
4255
+ [name: string]: unknown;
4256
+ };
4257
+ content: {
4258
+ "application/json": {
4259
+ /** @example error */
4260
+ status?: string;
4261
+ /** @example Seat code is already reserved */
4262
+ message?: string;
4263
+ };
4264
+ };
4265
+ };
4266
+ 500: components["responses"]["ServerError"];
4267
+ };
4268
+ };
4269
+ delete?: never;
4270
+ options?: never;
4271
+ head?: never;
4272
+ patch?: never;
4273
+ trace?: never;
4274
+ };
4275
+ "/institutions/{institutionId}/seats": {
4276
+ parameters: {
4277
+ query?: never;
4278
+ header?: never;
4279
+ path?: never;
4280
+ cookie?: never;
4281
+ };
4282
+ /**
4283
+ * List all seats of an institution
4284
+ * @description Retrieve a list of all seats associated with a specific institution.
4285
+ * Each seat includes the number of users currently assigned to the group (usedQuantity).
4286
+ */
4287
+ get: {
4288
+ parameters: {
4289
+ query?: never;
4290
+ header?: never;
4291
+ path: {
4292
+ /** @description Institution ID */
4293
+ institutionId: string;
4294
+ };
4295
+ cookie?: never;
4296
+ };
4297
+ requestBody?: never;
4298
+ responses: {
4299
+ /** @description List of Seats with user count */
4300
+ 200: {
4301
+ headers: {
4302
+ [name: string]: unknown;
4303
+ };
4304
+ content: {
4305
+ "application/json": {
4306
+ /** @example success */
4307
+ status?: string;
4308
+ data?: components["schemas"]["Seats"][];
4309
+ };
4310
+ };
4311
+ };
4312
+ 401: components["responses"]["Unauthorized"];
4313
+ 404: components["responses"]["NotFound"];
4314
+ 500: components["responses"]["ServerError"];
4315
+ };
4316
+ };
4317
+ put?: never;
4318
+ /**
4319
+ * Associate a seat with an institution
4320
+ * @description Create a new association between a seat and an institution
4321
+ */
4322
+ post: {
4323
+ parameters: {
4324
+ query?: never;
4325
+ header?: never;
4326
+ path: {
4327
+ /** @description Institution ID */
4328
+ institutionId: string;
4329
+ };
4330
+ cookie?: never;
4331
+ };
4332
+ requestBody: {
4333
+ content: {
4334
+ "application/json": components["schemas"]["CreateSeatsDto"];
4335
+ };
4336
+ };
4337
+ responses: {
4338
+ /** @description Seat associated successfully */
4339
+ 201: {
4340
+ headers: {
4341
+ [name: string]: unknown;
4342
+ };
4343
+ content: {
4344
+ "application/json": {
4345
+ /** @example success */
4346
+ status?: string;
4347
+ data?: components["schemas"]["Seats"];
4348
+ };
4349
+ };
4350
+ };
4351
+ 400: components["responses"]["BadRequest"];
4352
+ 401: components["responses"]["Unauthorized"];
4353
+ 404: components["responses"]["NotFound"];
4354
+ 409: components["responses"]["Conflict"];
4355
+ 500: components["responses"]["ServerError"];
4356
+ };
4357
+ };
4358
+ delete?: never;
4359
+ options?: never;
4360
+ head?: never;
4361
+ patch?: never;
4362
+ trace?: never;
4363
+ };
4364
+ "/institutions/{institutionId}/seats/{groupId}": {
4365
+ parameters: {
4366
+ query?: never;
4367
+ header?: never;
4368
+ path?: never;
4369
+ cookie?: never;
4370
+ };
4371
+ get?: never;
4372
+ put?: never;
4373
+ post?: never;
4374
+ /**
4375
+ * Remove a seat from an institution
4376
+ * @description Remove the association between a seat and an institution
4377
+ */
4378
+ delete: {
4379
+ parameters: {
4380
+ query?: never;
4381
+ header?: never;
4382
+ path: {
4383
+ /** @description Institution ID */
4384
+ institutionId: string;
4385
+ /** @description Group ID (seat identifier) */
4386
+ groupId: string;
4387
+ };
4388
+ cookie?: never;
4389
+ };
4390
+ requestBody?: never;
4391
+ responses: {
4392
+ /** @description Seat removed from institution successfully */
4393
+ 204: {
4394
+ headers: {
4395
+ [name: string]: unknown;
4396
+ };
4397
+ content?: never;
4398
+ };
4399
+ 400: components["responses"]["BadRequest"];
4400
+ 401: components["responses"]["Unauthorized"];
4401
+ 404: components["responses"]["NotFound"];
4402
+ 500: components["responses"]["ServerError"];
4403
+ };
4404
+ };
4405
+ options?: never;
4406
+ head?: never;
4407
+ /**
4408
+ * Update institution seat quantity
4409
+ * @description Update the available quantity for a seat in an institution
4410
+ */
4411
+ patch: {
4412
+ parameters: {
4413
+ query?: never;
4414
+ header?: never;
4415
+ path: {
4416
+ /** @description Institution ID */
4417
+ institutionId: string;
4418
+ /** @description Group ID */
4419
+ groupId: string;
4420
+ };
4421
+ cookie?: never;
4422
+ };
4423
+ requestBody: {
4424
+ content: {
4425
+ "application/json": components["schemas"]["UpdateSeatsDto"];
4426
+ };
4427
+ };
4428
+ responses: {
4429
+ /** @description Institution seat updated successfully */
4430
+ 200: {
4431
+ headers: {
4432
+ [name: string]: unknown;
4433
+ };
4434
+ content: {
4435
+ "application/json": {
4436
+ /** @example success */
4437
+ status?: string;
4438
+ data?: components["schemas"]["Seats"];
4439
+ };
4440
+ };
4441
+ };
4442
+ 400: components["responses"]["BadRequest"];
4443
+ 401: components["responses"]["Unauthorized"];
4444
+ 404: components["responses"]["NotFound"];
4445
+ 500: components["responses"]["ServerError"];
4446
+ };
4447
+ };
4448
+ trace?: never;
4449
+ };
4450
+ "/institutions/{institutionId}/seats/users": {
4451
+ parameters: {
4452
+ query?: never;
4453
+ header?: never;
4454
+ path?: never;
4455
+ cookie?: never;
4456
+ };
4457
+ /**
4458
+ * Get all users of all seats in an institution
4459
+ * @description Retrieve all users from all seats associated with a specific institution.
4460
+ * Returns a map where keys are seat IDs and values are arrays of users in each seat.
4461
+ * This is more efficient than calling /seats/{id}/users multiple times.
4462
+ */
4463
+ get: {
4464
+ parameters: {
4465
+ query?: never;
4466
+ header?: never;
4467
+ path: {
4468
+ /** @description Institution ID */
4469
+ institutionId: string;
4470
+ };
4471
+ cookie?: never;
4472
+ };
4473
+ requestBody?: never;
4474
+ responses: {
4475
+ /** @description Users grouped by group ID */
4476
+ 200: {
4477
+ headers: {
4478
+ [name: string]: unknown;
4479
+ };
4480
+ content: {
4481
+ /**
4482
+ * @example {
4483
+ * "status": "success",
4484
+ * "data": {
4485
+ * "group-uuid-1": [
4486
+ * {
4487
+ * "id": "user-uuid-1",
4488
+ * "firstName": "John",
4489
+ * "lastName": "Doe",
4490
+ * "email": "john@example.com",
4491
+ * "assignedAt": "2024-01-15T10:30:00Z"
4492
+ * },
4493
+ * {
4494
+ * "id": "user-uuid-2",
4495
+ * "firstName": "Jane",
4496
+ * "lastName": "Smith",
4497
+ * "email": "jane@example.com",
4498
+ * "assignedAt": "2024-01-16T14:20:00Z"
4499
+ * }
4500
+ * ],
4501
+ * "group-uuid-2": [
4502
+ * {
4503
+ * "id": "user-uuid-3",
4504
+ * "firstName": "Bob",
4505
+ * "lastName": "Wilson",
4506
+ * "email": "bob@example.com",
4507
+ * "assignedAt": "2024-01-17T09:15:00Z"
4508
+ * }
4509
+ * ]
4510
+ * }
4511
+ * }
4512
+ */
4513
+ "application/json": {
4514
+ /** @example success */
4515
+ status?: string;
4516
+ /** @description Map of group IDs to arrays of users */
4517
+ data?: {
4518
+ [key: string]: {
4519
+ /** Format: uuid */
4520
+ id?: string;
4521
+ firstName?: string;
4522
+ lastName?: string;
4523
+ email?: string;
4524
+ document?: string;
4525
+ phone?: string;
4526
+ isActive?: boolean;
4527
+ /** Format: date-time */
4528
+ assignedAt?: string;
4529
+ /** Format: uuid */
4530
+ assignedBy?: string;
4531
+ }[];
4532
+ };
4533
+ };
4534
+ };
4535
+ };
4536
+ 401: components["responses"]["Unauthorized"];
4537
+ 404: components["responses"]["NotFound"];
4538
+ 500: components["responses"]["ServerError"];
4539
+ };
4540
+ };
4541
+ put?: never;
4542
+ post?: never;
4543
+ delete?: never;
4544
+ options?: never;
4545
+ head?: never;
4546
+ patch?: never;
4547
+ trace?: never;
4548
+ };
4549
+ "/organizations": {
4550
+ parameters: {
4551
+ query?: never;
4552
+ header?: never;
4553
+ path?: never;
4554
+ cookie?: never;
4555
+ };
4556
+ /**
4557
+ * List all organizations
4558
+ * @description Retrieve a list of all organizations with optional filters
3662
4559
  */
3663
4560
  get: {
3664
4561
  parameters: {
3665
4562
  query?: {
3666
4563
  /** @description Filter by organization name */
3667
4564
  name?: string;
3668
- /** @description Filter by organization type (municipal, estadual, federal, privada) */
3669
- type?: string;
4565
+ /** @description Filter by organization type (municipal, estadual, federal, privada) */
4566
+ type?: string;
4567
+ /** @description Filter by active status */
4568
+ isActive?: boolean;
4569
+ /** @description Search in organization name */
4570
+ search?: string;
4571
+ /** @description Page number */
4572
+ page?: number;
4573
+ /** @description Items per page */
4574
+ limit?: number;
4575
+ };
4576
+ header?: never;
4577
+ path?: never;
4578
+ cookie?: never;
4579
+ };
4580
+ requestBody?: never;
4581
+ responses: {
4582
+ /** @description List of organizations */
4583
+ 200: {
4584
+ headers: {
4585
+ [name: string]: unknown;
4586
+ };
4587
+ content: {
4588
+ "application/json": {
4589
+ /** @example success */
4590
+ status?: string;
4591
+ data?: components["schemas"]["Organization"][];
4592
+ meta?: {
4593
+ total?: number;
4594
+ page?: number;
4595
+ limit?: number;
4596
+ totalPages?: number;
4597
+ };
4598
+ };
4599
+ };
4600
+ };
4601
+ 401: components["responses"]["Unauthorized"];
4602
+ 500: components["responses"]["ServerError"];
4603
+ };
4604
+ };
4605
+ put?: never;
4606
+ /**
4607
+ * Create a new organization
4608
+ * @description Create a new organization in the hierarchy
4609
+ */
4610
+ post: {
4611
+ parameters: {
4612
+ query?: never;
4613
+ header?: never;
4614
+ path?: never;
4615
+ cookie?: never;
4616
+ };
4617
+ requestBody: {
4618
+ content: {
4619
+ "application/json": components["schemas"]["CreateOrganizationDto"];
4620
+ };
4621
+ };
4622
+ responses: {
4623
+ /** @description Organization created successfully */
4624
+ 201: {
4625
+ headers: {
4626
+ [name: string]: unknown;
4627
+ };
4628
+ content: {
4629
+ "application/json": {
4630
+ /** @example success */
4631
+ status?: string;
4632
+ data?: components["schemas"]["Organization"];
4633
+ };
4634
+ };
4635
+ };
4636
+ 400: components["responses"]["BadRequest"];
4637
+ 401: components["responses"]["Unauthorized"];
4638
+ 500: components["responses"]["ServerError"];
4639
+ };
4640
+ };
4641
+ delete?: never;
4642
+ options?: never;
4643
+ head?: never;
4644
+ patch?: never;
4645
+ trace?: never;
4646
+ };
4647
+ "/organizations/{id}": {
4648
+ parameters: {
4649
+ query?: never;
4650
+ header?: never;
4651
+ path?: never;
4652
+ cookie?: never;
4653
+ };
4654
+ /**
4655
+ * Get organization by ID
4656
+ * @description Retrieve detailed information about a specific organization
4657
+ */
4658
+ get: {
4659
+ parameters: {
4660
+ query?: never;
4661
+ header?: never;
4662
+ path: {
4663
+ /** @description Resource ID */
4664
+ id: components["parameters"]["id"];
4665
+ };
4666
+ cookie?: never;
4667
+ };
4668
+ requestBody?: never;
4669
+ responses: {
4670
+ /** @description Organization information */
4671
+ 200: {
4672
+ headers: {
4673
+ [name: string]: unknown;
4674
+ };
4675
+ content: {
4676
+ "application/json": {
4677
+ /** @example success */
4678
+ status?: string;
4679
+ data?: components["schemas"]["Organization"];
4680
+ };
4681
+ };
4682
+ };
4683
+ 400: components["responses"]["BadRequest"];
4684
+ 401: components["responses"]["Unauthorized"];
4685
+ 404: components["responses"]["NotFound"];
4686
+ 500: components["responses"]["ServerError"];
4687
+ };
4688
+ };
4689
+ put?: never;
4690
+ post?: never;
4691
+ /**
4692
+ * Delete organization
4693
+ * @description Remove an organization from the system. Cannot delete organizations with children.
4694
+ */
4695
+ delete: {
4696
+ parameters: {
4697
+ query?: never;
4698
+ header?: never;
4699
+ path: {
4700
+ /** @description Resource ID */
4701
+ id: components["parameters"]["id"];
4702
+ };
4703
+ cookie?: never;
4704
+ };
4705
+ requestBody?: never;
4706
+ responses: {
4707
+ /** @description Organization deleted successfully */
4708
+ 204: {
4709
+ headers: {
4710
+ [name: string]: unknown;
4711
+ };
4712
+ content?: never;
4713
+ };
4714
+ 400: components["responses"]["BadRequest"];
4715
+ 401: components["responses"]["Unauthorized"];
4716
+ 404: components["responses"]["NotFound"];
4717
+ 500: components["responses"]["ServerError"];
4718
+ };
4719
+ };
4720
+ options?: never;
4721
+ head?: never;
4722
+ /**
4723
+ * Update organization
4724
+ * @description Update organization information
4725
+ */
4726
+ patch: {
4727
+ parameters: {
4728
+ query?: never;
4729
+ header?: never;
4730
+ path: {
4731
+ /** @description Resource ID */
4732
+ id: components["parameters"]["id"];
4733
+ };
4734
+ cookie?: never;
4735
+ };
4736
+ requestBody: {
4737
+ content: {
4738
+ "application/json": components["schemas"]["UpdateOrganizationDto"];
4739
+ };
4740
+ };
4741
+ responses: {
4742
+ /** @description Organization updated successfully */
4743
+ 200: {
4744
+ headers: {
4745
+ [name: string]: unknown;
4746
+ };
4747
+ content: {
4748
+ "application/json": {
4749
+ /** @example success */
4750
+ status?: string;
4751
+ data?: components["schemas"]["Organization"];
4752
+ };
4753
+ };
4754
+ };
4755
+ 400: components["responses"]["BadRequest"];
4756
+ 401: components["responses"]["Unauthorized"];
4757
+ 404: components["responses"]["NotFound"];
4758
+ 500: components["responses"]["ServerError"];
4759
+ };
4760
+ };
4761
+ trace?: never;
4762
+ };
4763
+ "/products": {
4764
+ parameters: {
4765
+ query?: never;
4766
+ header?: never;
4767
+ path?: never;
4768
+ cookie?: never;
4769
+ };
4770
+ /**
4771
+ * List all products
4772
+ * @description Retrieve a paginated list of all products
4773
+ */
4774
+ get: {
4775
+ parameters: {
4776
+ query?: {
4777
+ /** @description Filter by product name (partial match) */
4778
+ name?: string;
4779
+ /** @description Search products by name */
4780
+ search?: string;
4781
+ /** @description Page number */
4782
+ page?: number;
4783
+ /** @description Number of items per page */
4784
+ limit?: number;
4785
+ };
4786
+ header?: never;
4787
+ path?: never;
4788
+ cookie?: never;
4789
+ };
4790
+ requestBody?: never;
4791
+ responses: {
4792
+ /** @description List of products */
4793
+ 200: {
4794
+ headers: {
4795
+ [name: string]: unknown;
4796
+ };
4797
+ content: {
4798
+ "application/json": {
4799
+ /** @example success */
4800
+ status?: string;
4801
+ data?: components["schemas"]["Product"][];
4802
+ meta?: {
4803
+ total?: number;
4804
+ page?: number;
4805
+ limit?: number;
4806
+ totalPages?: number;
4807
+ };
4808
+ };
4809
+ };
4810
+ };
4811
+ 401: components["responses"]["Unauthorized"];
4812
+ 500: components["responses"]["ServerError"];
4813
+ };
4814
+ };
4815
+ put?: never;
4816
+ /**
4817
+ * Create a new product
4818
+ * @description Create a new product in the system
4819
+ */
4820
+ post: {
4821
+ parameters: {
4822
+ query?: never;
4823
+ header?: never;
4824
+ path?: never;
4825
+ cookie?: never;
4826
+ };
4827
+ requestBody: {
4828
+ content: {
4829
+ "application/json": components["schemas"]["CreateProductDto"];
4830
+ };
4831
+ };
4832
+ responses: {
4833
+ /** @description Product created successfully */
4834
+ 201: {
4835
+ headers: {
4836
+ [name: string]: unknown;
4837
+ };
4838
+ content: {
4839
+ "application/json": {
4840
+ /** @example success */
4841
+ status?: string;
4842
+ data?: components["schemas"]["Product"];
4843
+ };
4844
+ };
4845
+ };
4846
+ 400: components["responses"]["BadRequest"];
4847
+ 401: components["responses"]["Unauthorized"];
4848
+ /** @description Product with this name already exists */
4849
+ 409: {
4850
+ headers: {
4851
+ [name: string]: unknown;
4852
+ };
4853
+ content: {
4854
+ "application/json": {
4855
+ /** @example error */
4856
+ status?: string;
4857
+ /** @example Product with this name already exists */
4858
+ message?: string;
4859
+ };
4860
+ };
4861
+ };
4862
+ 500: components["responses"]["ServerError"];
4863
+ };
4864
+ };
4865
+ delete?: never;
4866
+ options?: never;
4867
+ head?: never;
4868
+ patch?: never;
4869
+ trace?: never;
4870
+ };
4871
+ "/products/{id}": {
4872
+ parameters: {
4873
+ query?: never;
4874
+ header?: never;
4875
+ path?: never;
4876
+ cookie?: never;
4877
+ };
4878
+ /**
4879
+ * Get product by ID
4880
+ * @description Retrieve detailed information about a specific product including associated seats
4881
+ */
4882
+ get: {
4883
+ parameters: {
4884
+ query?: never;
4885
+ header?: never;
4886
+ path: {
4887
+ /** @description Product ID */
4888
+ id: string;
4889
+ };
4890
+ cookie?: never;
4891
+ };
4892
+ requestBody?: never;
4893
+ responses: {
4894
+ /** @description Product information */
4895
+ 200: {
4896
+ headers: {
4897
+ [name: string]: unknown;
4898
+ };
4899
+ content: {
4900
+ "application/json": {
4901
+ /** @example success */
4902
+ status?: string;
4903
+ data?: components["schemas"]["Product"];
4904
+ };
4905
+ };
4906
+ };
4907
+ 400: components["responses"]["BadRequest"];
4908
+ 401: components["responses"]["Unauthorized"];
4909
+ 404: components["responses"]["NotFound"];
4910
+ 500: components["responses"]["ServerError"];
4911
+ };
4912
+ };
4913
+ put?: never;
4914
+ post?: never;
4915
+ /**
4916
+ * Delete product
4917
+ * @description Remove a product from the system
4918
+ */
4919
+ delete: {
4920
+ parameters: {
4921
+ query?: never;
4922
+ header?: never;
4923
+ path: {
4924
+ /** @description Product ID */
4925
+ id: string;
4926
+ };
4927
+ cookie?: never;
4928
+ };
4929
+ requestBody?: never;
4930
+ responses: {
4931
+ /** @description Product deleted successfully */
4932
+ 204: {
4933
+ headers: {
4934
+ [name: string]: unknown;
4935
+ };
4936
+ content?: never;
4937
+ };
4938
+ 400: components["responses"]["BadRequest"];
4939
+ 401: components["responses"]["Unauthorized"];
4940
+ 404: components["responses"]["NotFound"];
4941
+ 500: components["responses"]["ServerError"];
4942
+ };
4943
+ };
4944
+ options?: never;
4945
+ head?: never;
4946
+ /**
4947
+ * Update product
4948
+ * @description Update product information
4949
+ */
4950
+ patch: {
4951
+ parameters: {
4952
+ query?: never;
4953
+ header?: never;
4954
+ path: {
4955
+ /** @description Product ID */
4956
+ id: string;
4957
+ };
4958
+ cookie?: never;
4959
+ };
4960
+ requestBody: {
4961
+ content: {
4962
+ "application/json": components["schemas"]["UpdateProductDto"];
4963
+ };
4964
+ };
4965
+ responses: {
4966
+ /** @description Product updated successfully */
4967
+ 200: {
4968
+ headers: {
4969
+ [name: string]: unknown;
4970
+ };
4971
+ content: {
4972
+ "application/json": {
4973
+ /** @example success */
4974
+ status?: string;
4975
+ data?: components["schemas"]["Product"];
4976
+ };
4977
+ };
4978
+ };
4979
+ 400: components["responses"]["BadRequest"];
4980
+ 401: components["responses"]["Unauthorized"];
4981
+ 404: components["responses"]["NotFound"];
4982
+ /** @description Product with this name already exists */
4983
+ 409: {
4984
+ headers: {
4985
+ [name: string]: unknown;
4986
+ };
4987
+ content?: never;
4988
+ };
4989
+ 500: components["responses"]["ServerError"];
4990
+ };
4991
+ };
4992
+ trace?: never;
4993
+ };
4994
+ "/quiz-attempt-answers": {
4995
+ parameters: {
4996
+ query?: never;
4997
+ header?: never;
4998
+ path?: never;
4999
+ cookie?: never;
5000
+ };
5001
+ /**
5002
+ * List all quiz attempt answers
5003
+ * @description Retrieve a list of all answers submitted in quiz attempts
5004
+ */
5005
+ get: {
5006
+ parameters: {
5007
+ query?: {
5008
+ /** @description Filter by quiz attempt ID */
5009
+ quizAttemptId?: string;
5010
+ /** @description Filter by quiz question answer ID */
5011
+ quizQuestionAnswerId?: string;
5012
+ /** @description Page number */
5013
+ page?: number;
5014
+ /** @description Items per page */
5015
+ limit?: number;
5016
+ };
5017
+ header?: never;
5018
+ path?: never;
5019
+ cookie?: never;
5020
+ };
5021
+ requestBody?: never;
5022
+ responses: {
5023
+ /** @description List of quiz attempt answers */
5024
+ 200: {
5025
+ headers: {
5026
+ [name: string]: unknown;
5027
+ };
5028
+ content: {
5029
+ "application/json": {
5030
+ /** @example success */
5031
+ status?: string;
5032
+ data?: components["schemas"]["QuizAttemptAnswer"][];
5033
+ meta?: components["schemas"]["PaginationMeta"];
5034
+ };
5035
+ };
5036
+ };
5037
+ 401: components["responses"]["Unauthorized"];
5038
+ 500: components["responses"]["ServerError"];
5039
+ };
5040
+ };
5041
+ put?: never;
5042
+ /**
5043
+ * Submit a quiz attempt answer
5044
+ * @description Record a user's answer for a quiz question
5045
+ */
5046
+ post: {
5047
+ parameters: {
5048
+ query?: never;
5049
+ header?: never;
5050
+ path?: never;
5051
+ cookie?: never;
5052
+ };
5053
+ requestBody: {
5054
+ content: {
5055
+ "application/json": components["schemas"]["CreateQuizAttemptAnswerDto"];
5056
+ };
5057
+ };
5058
+ responses: {
5059
+ /** @description Quiz attempt answer submitted successfully */
5060
+ 201: {
5061
+ headers: {
5062
+ [name: string]: unknown;
5063
+ };
5064
+ content: {
5065
+ "application/json": {
5066
+ /** @example success */
5067
+ status?: string;
5068
+ data?: components["schemas"]["QuizAttemptAnswer"];
5069
+ };
5070
+ };
5071
+ };
5072
+ 400: components["responses"]["BadRequest"];
5073
+ 401: components["responses"]["Unauthorized"];
5074
+ 500: components["responses"]["ServerError"];
5075
+ };
5076
+ };
5077
+ delete?: never;
5078
+ options?: never;
5079
+ head?: never;
5080
+ patch?: never;
5081
+ trace?: never;
5082
+ };
5083
+ "/quiz-attempt-answers/{id}": {
5084
+ parameters: {
5085
+ query?: never;
5086
+ header?: never;
5087
+ path?: never;
5088
+ cookie?: never;
5089
+ };
5090
+ /**
5091
+ * Get quiz attempt answer by ID
5092
+ * @description Retrieve detailed information about a specific quiz attempt answer
5093
+ */
5094
+ get: {
5095
+ parameters: {
5096
+ query?: never;
5097
+ header?: never;
5098
+ path: {
5099
+ /** @description Resource ID */
5100
+ id: components["parameters"]["id"];
5101
+ };
5102
+ cookie?: never;
5103
+ };
5104
+ requestBody?: never;
5105
+ responses: {
5106
+ /** @description Quiz attempt answer information */
5107
+ 200: {
5108
+ headers: {
5109
+ [name: string]: unknown;
5110
+ };
5111
+ content: {
5112
+ "application/json": {
5113
+ /** @example success */
5114
+ status?: string;
5115
+ data?: components["schemas"]["QuizAttemptAnswer"];
5116
+ };
5117
+ };
5118
+ };
5119
+ 400: components["responses"]["BadRequest"];
5120
+ 401: components["responses"]["Unauthorized"];
5121
+ 404: components["responses"]["NotFound"];
5122
+ 500: components["responses"]["ServerError"];
5123
+ };
5124
+ };
5125
+ put?: never;
5126
+ post?: never;
5127
+ /**
5128
+ * Delete quiz attempt answer
5129
+ * @description Remove a quiz attempt answer from the system
5130
+ */
5131
+ delete: {
5132
+ parameters: {
5133
+ query?: never;
5134
+ header?: never;
5135
+ path: {
5136
+ /** @description Resource ID */
5137
+ id: components["parameters"]["id"];
5138
+ };
5139
+ cookie?: never;
5140
+ };
5141
+ requestBody?: never;
5142
+ responses: {
5143
+ /** @description Quiz attempt answer deleted successfully */
5144
+ 204: {
5145
+ headers: {
5146
+ [name: string]: unknown;
5147
+ };
5148
+ content?: never;
5149
+ };
5150
+ 400: components["responses"]["BadRequest"];
5151
+ 401: components["responses"]["Unauthorized"];
5152
+ 404: components["responses"]["NotFound"];
5153
+ 500: components["responses"]["ServerError"];
5154
+ };
5155
+ };
5156
+ options?: never;
5157
+ head?: never;
5158
+ patch?: never;
5159
+ trace?: never;
5160
+ };
5161
+ "/quiz-attempts": {
5162
+ parameters: {
5163
+ query?: never;
5164
+ header?: never;
5165
+ path?: never;
5166
+ cookie?: never;
5167
+ };
5168
+ /**
5169
+ * List all quiz attempts
5170
+ * @description Retrieve a list of all quiz attempts with optional filtering
5171
+ */
5172
+ get: {
5173
+ parameters: {
5174
+ query?: {
5175
+ /** @description Filter by quiz ID */
5176
+ quizId?: string;
5177
+ /** @description Filter by user ID */
5178
+ userId?: string;
5179
+ /** @description Filter by passed status */
5180
+ passed?: boolean;
5181
+ /** @description Filter by completion status */
5182
+ completed?: boolean;
5183
+ /** @description Page number */
5184
+ page?: number;
5185
+ /** @description Items per page */
5186
+ limit?: number;
5187
+ };
5188
+ header?: never;
5189
+ path?: never;
5190
+ cookie?: never;
5191
+ };
5192
+ requestBody?: never;
5193
+ responses: {
5194
+ /** @description List of quiz attempts */
5195
+ 200: {
5196
+ headers: {
5197
+ [name: string]: unknown;
5198
+ };
5199
+ content: {
5200
+ "application/json": {
5201
+ /** @example success */
5202
+ status?: string;
5203
+ data?: components["schemas"]["QuizAttempt"][];
5204
+ meta?: components["schemas"]["PaginationMeta"];
5205
+ };
5206
+ };
5207
+ };
5208
+ 401: components["responses"]["Unauthorized"];
5209
+ 500: components["responses"]["ServerError"];
5210
+ };
5211
+ };
5212
+ put?: never;
5213
+ /**
5214
+ * Create a new quiz attempt
5215
+ * @description Start a new quiz attempt for a user
5216
+ */
5217
+ post: {
5218
+ parameters: {
5219
+ query?: never;
5220
+ header?: never;
5221
+ path?: never;
5222
+ cookie?: never;
5223
+ };
5224
+ requestBody: {
5225
+ content: {
5226
+ "application/json": components["schemas"]["CreateQuizAttemptDto"];
5227
+ };
5228
+ };
5229
+ responses: {
5230
+ /** @description Quiz attempt created successfully */
5231
+ 201: {
5232
+ headers: {
5233
+ [name: string]: unknown;
5234
+ };
5235
+ content: {
5236
+ "application/json": {
5237
+ /** @example success */
5238
+ status?: string;
5239
+ data?: components["schemas"]["QuizAttempt"];
5240
+ };
5241
+ };
5242
+ };
5243
+ 400: components["responses"]["BadRequest"];
5244
+ 401: components["responses"]["Unauthorized"];
5245
+ 500: components["responses"]["ServerError"];
5246
+ };
5247
+ };
5248
+ delete?: never;
5249
+ options?: never;
5250
+ head?: never;
5251
+ patch?: never;
5252
+ trace?: never;
5253
+ };
5254
+ "/quiz-attempts/{id}": {
5255
+ parameters: {
5256
+ query?: never;
5257
+ header?: never;
5258
+ path?: never;
5259
+ cookie?: never;
5260
+ };
5261
+ /**
5262
+ * Get quiz attempt by ID
5263
+ * @description Retrieve detailed information about a specific quiz attempt
5264
+ */
5265
+ get: {
5266
+ parameters: {
5267
+ query?: never;
5268
+ header?: never;
5269
+ path: {
5270
+ /** @description Resource ID */
5271
+ id: components["parameters"]["id"];
5272
+ };
5273
+ cookie?: never;
5274
+ };
5275
+ requestBody?: never;
5276
+ responses: {
5277
+ /** @description Quiz attempt information */
5278
+ 200: {
5279
+ headers: {
5280
+ [name: string]: unknown;
5281
+ };
5282
+ content: {
5283
+ "application/json": {
5284
+ /** @example success */
5285
+ status?: string;
5286
+ data?: components["schemas"]["QuizAttempt"];
5287
+ };
5288
+ };
5289
+ };
5290
+ 400: components["responses"]["BadRequest"];
5291
+ 401: components["responses"]["Unauthorized"];
5292
+ 404: components["responses"]["NotFound"];
5293
+ 500: components["responses"]["ServerError"];
5294
+ };
5295
+ };
5296
+ put?: never;
5297
+ post?: never;
5298
+ /**
5299
+ * Delete quiz attempt
5300
+ * @description Remove a quiz attempt from the system
5301
+ */
5302
+ delete: {
5303
+ parameters: {
5304
+ query?: never;
5305
+ header?: never;
5306
+ path: {
5307
+ /** @description Resource ID */
5308
+ id: components["parameters"]["id"];
5309
+ };
5310
+ cookie?: never;
5311
+ };
5312
+ requestBody?: never;
5313
+ responses: {
5314
+ /** @description Quiz attempt deleted successfully */
5315
+ 204: {
5316
+ headers: {
5317
+ [name: string]: unknown;
5318
+ };
5319
+ content?: never;
5320
+ };
5321
+ 400: components["responses"]["BadRequest"];
5322
+ 401: components["responses"]["Unauthorized"];
5323
+ 404: components["responses"]["NotFound"];
5324
+ 500: components["responses"]["ServerError"];
5325
+ };
5326
+ };
5327
+ options?: never;
5328
+ head?: never;
5329
+ /**
5330
+ * Update quiz attempt
5331
+ * @description Update quiz attempt information (score, completion, etc.)
5332
+ */
5333
+ patch: {
5334
+ parameters: {
5335
+ query?: never;
5336
+ header?: never;
5337
+ path: {
5338
+ /** @description Resource ID */
5339
+ id: components["parameters"]["id"];
5340
+ };
5341
+ cookie?: never;
5342
+ };
5343
+ requestBody: {
5344
+ content: {
5345
+ "application/json": components["schemas"]["UpdateQuizAttemptDto"];
5346
+ };
5347
+ };
5348
+ responses: {
5349
+ /** @description Quiz attempt updated successfully */
5350
+ 200: {
5351
+ headers: {
5352
+ [name: string]: unknown;
5353
+ };
5354
+ content: {
5355
+ "application/json": {
5356
+ /** @example success */
5357
+ status?: string;
5358
+ data?: components["schemas"]["QuizAttempt"];
5359
+ };
5360
+ };
5361
+ };
5362
+ 400: components["responses"]["BadRequest"];
5363
+ 401: components["responses"]["Unauthorized"];
5364
+ 404: components["responses"]["NotFound"];
5365
+ 500: components["responses"]["ServerError"];
5366
+ };
5367
+ };
5368
+ trace?: never;
5369
+ };
5370
+ "/quiz-question-answers": {
5371
+ parameters: {
5372
+ query?: never;
5373
+ header?: never;
5374
+ path?: never;
5375
+ cookie?: never;
5376
+ };
5377
+ /**
5378
+ * List all quiz question answers
5379
+ * @description Retrieve a list of all answers for quiz questions
5380
+ */
5381
+ get: {
5382
+ parameters: {
5383
+ query?: {
5384
+ /** @description Filter by question ID */
5385
+ questionId?: string;
5386
+ /** @description Filter by correct answers */
5387
+ isCorrect?: boolean;
5388
+ /** @description Search in answer text */
5389
+ search?: string;
5390
+ /** @description Page number */
5391
+ page?: number;
5392
+ /** @description Items per page */
5393
+ limit?: number;
5394
+ };
5395
+ header?: never;
5396
+ path?: never;
5397
+ cookie?: never;
5398
+ };
5399
+ requestBody?: never;
5400
+ responses: {
5401
+ /** @description List of quiz question answers */
5402
+ 200: {
5403
+ headers: {
5404
+ [name: string]: unknown;
5405
+ };
5406
+ content: {
5407
+ "application/json": {
5408
+ /** @example success */
5409
+ status?: string;
5410
+ data?: components["schemas"]["QuizQuestionAnswer"][];
5411
+ meta?: components["schemas"]["PaginationMeta"];
5412
+ };
5413
+ };
5414
+ };
5415
+ 401: components["responses"]["Unauthorized"];
5416
+ 500: components["responses"]["ServerError"];
5417
+ };
5418
+ };
5419
+ put?: never;
5420
+ /**
5421
+ * Create a new quiz question answer
5422
+ * @description Create a new answer option for a quiz question
5423
+ */
5424
+ post: {
5425
+ parameters: {
5426
+ query?: never;
5427
+ header?: never;
5428
+ path?: never;
5429
+ cookie?: never;
5430
+ };
5431
+ requestBody: {
5432
+ content: {
5433
+ "application/json": components["schemas"]["CreateQuizQuestionAnswerDto"];
5434
+ };
5435
+ };
5436
+ responses: {
5437
+ /** @description Quiz question answer created successfully */
5438
+ 201: {
5439
+ headers: {
5440
+ [name: string]: unknown;
5441
+ };
5442
+ content: {
5443
+ "application/json": {
5444
+ /** @example success */
5445
+ status?: string;
5446
+ data?: components["schemas"]["QuizQuestionAnswer"];
5447
+ };
5448
+ };
5449
+ };
5450
+ 400: components["responses"]["BadRequest"];
5451
+ 401: components["responses"]["Unauthorized"];
5452
+ 500: components["responses"]["ServerError"];
5453
+ };
5454
+ };
5455
+ delete?: never;
5456
+ options?: never;
5457
+ head?: never;
5458
+ patch?: never;
5459
+ trace?: never;
5460
+ };
5461
+ "/quiz-question-answers/{id}": {
5462
+ parameters: {
5463
+ query?: never;
5464
+ header?: never;
5465
+ path?: never;
5466
+ cookie?: never;
5467
+ };
5468
+ /**
5469
+ * Get quiz question answer by ID
5470
+ * @description Retrieve detailed information about a specific quiz question answer
5471
+ */
5472
+ get: {
5473
+ parameters: {
5474
+ query?: never;
5475
+ header?: never;
5476
+ path: {
5477
+ /** @description Resource ID */
5478
+ id: components["parameters"]["id"];
5479
+ };
5480
+ cookie?: never;
5481
+ };
5482
+ requestBody?: never;
5483
+ responses: {
5484
+ /** @description Quiz question answer information */
5485
+ 200: {
5486
+ headers: {
5487
+ [name: string]: unknown;
5488
+ };
5489
+ content: {
5490
+ "application/json": {
5491
+ /** @example success */
5492
+ status?: string;
5493
+ data?: components["schemas"]["QuizQuestionAnswer"];
5494
+ };
5495
+ };
5496
+ };
5497
+ 400: components["responses"]["BadRequest"];
5498
+ 401: components["responses"]["Unauthorized"];
5499
+ 404: components["responses"]["NotFound"];
5500
+ 500: components["responses"]["ServerError"];
5501
+ };
5502
+ };
5503
+ put?: never;
5504
+ post?: never;
5505
+ /**
5506
+ * Delete quiz question answer
5507
+ * @description Remove a quiz question answer from the system
5508
+ */
5509
+ delete: {
5510
+ parameters: {
5511
+ query?: never;
5512
+ header?: never;
5513
+ path: {
5514
+ /** @description Resource ID */
5515
+ id: components["parameters"]["id"];
5516
+ };
5517
+ cookie?: never;
5518
+ };
5519
+ requestBody?: never;
5520
+ responses: {
5521
+ /** @description Quiz question answer deleted successfully */
5522
+ 204: {
5523
+ headers: {
5524
+ [name: string]: unknown;
5525
+ };
5526
+ content?: never;
5527
+ };
5528
+ 400: components["responses"]["BadRequest"];
5529
+ 401: components["responses"]["Unauthorized"];
5530
+ 404: components["responses"]["NotFound"];
5531
+ 500: components["responses"]["ServerError"];
5532
+ };
5533
+ };
5534
+ options?: never;
5535
+ head?: never;
5536
+ /**
5537
+ * Update quiz question answer
5538
+ * @description Update quiz question answer information
5539
+ */
5540
+ patch: {
5541
+ parameters: {
5542
+ query?: never;
5543
+ header?: never;
5544
+ path: {
5545
+ /** @description Resource ID */
5546
+ id: components["parameters"]["id"];
5547
+ };
5548
+ cookie?: never;
5549
+ };
5550
+ requestBody: {
5551
+ content: {
5552
+ "application/json": components["schemas"]["UpdateQuizQuestionAnswerDto"];
5553
+ };
5554
+ };
5555
+ responses: {
5556
+ /** @description Quiz question answer updated successfully */
5557
+ 200: {
5558
+ headers: {
5559
+ [name: string]: unknown;
5560
+ };
5561
+ content: {
5562
+ "application/json": {
5563
+ /** @example success */
5564
+ status?: string;
5565
+ data?: components["schemas"]["QuizQuestionAnswer"];
5566
+ };
5567
+ };
5568
+ };
5569
+ 400: components["responses"]["BadRequest"];
5570
+ 401: components["responses"]["Unauthorized"];
5571
+ 404: components["responses"]["NotFound"];
5572
+ 500: components["responses"]["ServerError"];
5573
+ };
5574
+ };
5575
+ trace?: never;
5576
+ };
5577
+ "/quiz-questions": {
5578
+ parameters: {
5579
+ query?: never;
5580
+ header?: never;
5581
+ path?: never;
5582
+ cookie?: never;
5583
+ };
5584
+ /**
5585
+ * List all quiz questions
5586
+ * @description Retrieve a list of all quiz questions with optional filtering
5587
+ */
5588
+ get: {
5589
+ parameters: {
5590
+ query?: {
5591
+ /** @description Filter by quiz ID */
5592
+ quizId?: string;
5593
+ /** @description Filter by question type */
5594
+ type?: "multiple_choice" | "true_false" | "open";
5595
+ /** @description Search in question text */
5596
+ search?: string;
5597
+ /** @description Page number */
5598
+ page?: number;
5599
+ /** @description Items per page */
5600
+ limit?: number;
5601
+ };
5602
+ header?: never;
5603
+ path?: never;
5604
+ cookie?: never;
5605
+ };
5606
+ requestBody?: never;
5607
+ responses: {
5608
+ /** @description List of quiz questions */
5609
+ 200: {
5610
+ headers: {
5611
+ [name: string]: unknown;
5612
+ };
5613
+ content: {
5614
+ "application/json": {
5615
+ /** @example success */
5616
+ status?: string;
5617
+ data?: components["schemas"]["QuizQuestion"][];
5618
+ meta?: components["schemas"]["PaginationMeta"];
5619
+ };
5620
+ };
5621
+ };
5622
+ 401: components["responses"]["Unauthorized"];
5623
+ 500: components["responses"]["ServerError"];
5624
+ };
5625
+ };
5626
+ put?: never;
5627
+ /**
5628
+ * Create a new quiz question
5629
+ * @description Create a new question for a quiz
5630
+ */
5631
+ post: {
5632
+ parameters: {
5633
+ query?: never;
5634
+ header?: never;
5635
+ path?: never;
5636
+ cookie?: never;
5637
+ };
5638
+ requestBody: {
5639
+ content: {
5640
+ "application/json": components["schemas"]["CreateQuizQuestionDto"];
5641
+ };
5642
+ };
5643
+ responses: {
5644
+ /** @description Quiz question created successfully */
5645
+ 201: {
5646
+ headers: {
5647
+ [name: string]: unknown;
5648
+ };
5649
+ content: {
5650
+ "application/json": {
5651
+ /** @example success */
5652
+ status?: string;
5653
+ data?: components["schemas"]["QuizQuestion"];
5654
+ };
5655
+ };
5656
+ };
5657
+ 400: components["responses"]["BadRequest"];
5658
+ 401: components["responses"]["Unauthorized"];
5659
+ 409: components["responses"]["Conflict"];
5660
+ 500: components["responses"]["ServerError"];
5661
+ };
5662
+ };
5663
+ delete?: never;
5664
+ options?: never;
5665
+ head?: never;
5666
+ patch?: never;
5667
+ trace?: never;
5668
+ };
5669
+ "/quiz-questions/{id}": {
5670
+ parameters: {
5671
+ query?: never;
5672
+ header?: never;
5673
+ path?: never;
5674
+ cookie?: never;
5675
+ };
5676
+ /**
5677
+ * Get quiz question by ID
5678
+ * @description Retrieve detailed information about a specific quiz question
5679
+ */
5680
+ get: {
5681
+ parameters: {
5682
+ query?: never;
5683
+ header?: never;
5684
+ path: {
5685
+ /** @description Resource ID */
5686
+ id: components["parameters"]["id"];
5687
+ };
5688
+ cookie?: never;
5689
+ };
5690
+ requestBody?: never;
5691
+ responses: {
5692
+ /** @description Quiz question information */
5693
+ 200: {
5694
+ headers: {
5695
+ [name: string]: unknown;
5696
+ };
5697
+ content: {
5698
+ "application/json": {
5699
+ /** @example success */
5700
+ status?: string;
5701
+ data?: components["schemas"]["QuizQuestion"];
5702
+ };
5703
+ };
5704
+ };
5705
+ 400: components["responses"]["BadRequest"];
5706
+ 401: components["responses"]["Unauthorized"];
5707
+ 404: components["responses"]["NotFound"];
5708
+ 500: components["responses"]["ServerError"];
5709
+ };
5710
+ };
5711
+ put?: never;
5712
+ post?: never;
5713
+ /**
5714
+ * Delete quiz question
5715
+ * @description Remove a quiz question from the system
5716
+ */
5717
+ delete: {
5718
+ parameters: {
5719
+ query?: never;
5720
+ header?: never;
5721
+ path: {
5722
+ /** @description Resource ID */
5723
+ id: components["parameters"]["id"];
5724
+ };
5725
+ cookie?: never;
5726
+ };
5727
+ requestBody?: never;
5728
+ responses: {
5729
+ /** @description Quiz question deleted successfully */
5730
+ 204: {
5731
+ headers: {
5732
+ [name: string]: unknown;
5733
+ };
5734
+ content?: never;
5735
+ };
5736
+ 400: components["responses"]["BadRequest"];
5737
+ 401: components["responses"]["Unauthorized"];
5738
+ 404: components["responses"]["NotFound"];
5739
+ 500: components["responses"]["ServerError"];
5740
+ };
5741
+ };
5742
+ options?: never;
5743
+ head?: never;
5744
+ /**
5745
+ * Update quiz question
5746
+ * @description Update quiz question information
5747
+ */
5748
+ patch: {
5749
+ parameters: {
5750
+ query?: never;
5751
+ header?: never;
5752
+ path: {
5753
+ /** @description Resource ID */
5754
+ id: components["parameters"]["id"];
5755
+ };
5756
+ cookie?: never;
5757
+ };
5758
+ requestBody: {
5759
+ content: {
5760
+ "application/json": components["schemas"]["UpdateQuizQuestionDto"];
5761
+ };
5762
+ };
5763
+ responses: {
5764
+ /** @description Quiz question updated successfully */
5765
+ 200: {
5766
+ headers: {
5767
+ [name: string]: unknown;
5768
+ };
5769
+ content: {
5770
+ "application/json": {
5771
+ /** @example success */
5772
+ status?: string;
5773
+ data?: components["schemas"]["QuizQuestion"];
5774
+ };
5775
+ };
5776
+ };
5777
+ 400: components["responses"]["BadRequest"];
5778
+ 401: components["responses"]["Unauthorized"];
5779
+ 404: components["responses"]["NotFound"];
5780
+ 409: components["responses"]["Conflict"];
5781
+ 500: components["responses"]["ServerError"];
5782
+ };
5783
+ };
5784
+ trace?: never;
5785
+ };
5786
+ "/quiz": {
5787
+ parameters: {
5788
+ query?: never;
5789
+ header?: never;
5790
+ path?: never;
5791
+ cookie?: never;
5792
+ };
5793
+ /**
5794
+ * List all quizzes
5795
+ * @description Retrieve a list of all quizzes with optional filtering
5796
+ */
5797
+ get: {
5798
+ parameters: {
5799
+ query?: {
5800
+ /** @description Filter by quiz title */
5801
+ title?: string;
5802
+ /** @description Filter by course ID */
5803
+ courseId?: string;
3670
5804
  /** @description Filter by active status */
3671
5805
  isActive?: boolean;
3672
- /** @description Search in organization name */
5806
+ /** @description Filter by creator user ID */
5807
+ createdBy?: string;
5808
+ /** @description Search in title */
3673
5809
  search?: string;
3674
5810
  /** @description Page number */
3675
5811
  page?: number;
@@ -3682,7 +5818,7 @@ export interface paths {
3682
5818
  };
3683
5819
  requestBody?: never;
3684
5820
  responses: {
3685
- /** @description List of organizations */
5821
+ /** @description List of quizzes */
3686
5822
  200: {
3687
5823
  headers: {
3688
5824
  [name: string]: unknown;
@@ -3691,13 +5827,8 @@ export interface paths {
3691
5827
  "application/json": {
3692
5828
  /** @example success */
3693
5829
  status?: string;
3694
- data?: components["schemas"]["Organization"][];
3695
- meta?: {
3696
- total?: number;
3697
- page?: number;
3698
- limit?: number;
3699
- totalPages?: number;
3700
- };
5830
+ data?: components["schemas"]["Quiz"][];
5831
+ meta?: components["schemas"]["PaginationMeta"];
3701
5832
  };
3702
5833
  };
3703
5834
  };
@@ -3707,8 +5838,8 @@ export interface paths {
3707
5838
  };
3708
5839
  put?: never;
3709
5840
  /**
3710
- * Create a new organization
3711
- * @description Create a new organization in the hierarchy
5841
+ * Create a new quiz
5842
+ * @description Create a new quiz with questions
3712
5843
  */
3713
5844
  post: {
3714
5845
  parameters: {
@@ -3719,11 +5850,11 @@ export interface paths {
3719
5850
  };
3720
5851
  requestBody: {
3721
5852
  content: {
3722
- "application/json": components["schemas"]["CreateOrganizationDto"];
5853
+ "application/json": components["schemas"]["CreateQuizDto"];
3723
5854
  };
3724
5855
  };
3725
5856
  responses: {
3726
- /** @description Organization created successfully */
5857
+ /** @description Quiz created successfully */
3727
5858
  201: {
3728
5859
  headers: {
3729
5860
  [name: string]: unknown;
@@ -3732,7 +5863,7 @@ export interface paths {
3732
5863
  "application/json": {
3733
5864
  /** @example success */
3734
5865
  status?: string;
3735
- data?: components["schemas"]["Organization"];
5866
+ data?: components["schemas"]["Quiz"];
3736
5867
  };
3737
5868
  };
3738
5869
  };
@@ -3747,7 +5878,7 @@ export interface paths {
3747
5878
  patch?: never;
3748
5879
  trace?: never;
3749
5880
  };
3750
- "/organizations/{id}": {
5881
+ "/quiz/{id}": {
3751
5882
  parameters: {
3752
5883
  query?: never;
3753
5884
  header?: never;
@@ -3755,8 +5886,8 @@ export interface paths {
3755
5886
  cookie?: never;
3756
5887
  };
3757
5888
  /**
3758
- * Get organization by ID
3759
- * @description Retrieve detailed information about a specific organization
5889
+ * Get quiz by ID
5890
+ * @description Retrieve detailed information about a specific quiz
3760
5891
  */
3761
5892
  get: {
3762
5893
  parameters: {
@@ -3770,7 +5901,7 @@ export interface paths {
3770
5901
  };
3771
5902
  requestBody?: never;
3772
5903
  responses: {
3773
- /** @description Organization information */
5904
+ /** @description Quiz information */
3774
5905
  200: {
3775
5906
  headers: {
3776
5907
  [name: string]: unknown;
@@ -3779,7 +5910,7 @@ export interface paths {
3779
5910
  "application/json": {
3780
5911
  /** @example success */
3781
5912
  status?: string;
3782
- data?: components["schemas"]["Organization"];
5913
+ data?: components["schemas"]["Quiz"];
3783
5914
  };
3784
5915
  };
3785
5916
  };
@@ -3792,8 +5923,8 @@ export interface paths {
3792
5923
  put?: never;
3793
5924
  post?: never;
3794
5925
  /**
3795
- * Delete organization
3796
- * @description Remove an organization from the system. Cannot delete organizations with children.
5926
+ * Delete quiz
5927
+ * @description Remove a quiz from the system
3797
5928
  */
3798
5929
  delete: {
3799
5930
  parameters: {
@@ -3807,7 +5938,7 @@ export interface paths {
3807
5938
  };
3808
5939
  requestBody?: never;
3809
5940
  responses: {
3810
- /** @description Organization deleted successfully */
5941
+ /** @description Quiz deleted successfully */
3811
5942
  204: {
3812
5943
  headers: {
3813
5944
  [name: string]: unknown;
@@ -3823,8 +5954,8 @@ export interface paths {
3823
5954
  options?: never;
3824
5955
  head?: never;
3825
5956
  /**
3826
- * Update organization
3827
- * @description Update organization information
5957
+ * Update quiz
5958
+ * @description Update quiz information
3828
5959
  */
3829
5960
  patch: {
3830
5961
  parameters: {
@@ -3838,11 +5969,11 @@ export interface paths {
3838
5969
  };
3839
5970
  requestBody: {
3840
5971
  content: {
3841
- "application/json": components["schemas"]["UpdateOrganizationDto"];
5972
+ "application/json": components["schemas"]["UpdateQuizDto"];
3842
5973
  };
3843
5974
  };
3844
5975
  responses: {
3845
- /** @description Organization updated successfully */
5976
+ /** @description Quiz updated successfully */
3846
5977
  200: {
3847
5978
  headers: {
3848
5979
  [name: string]: unknown;
@@ -3851,7 +5982,7 @@ export interface paths {
3851
5982
  "application/json": {
3852
5983
  /** @example success */
3853
5984
  status?: string;
3854
- data?: components["schemas"]["Organization"];
5985
+ data?: components["schemas"]["Quiz"];
3855
5986
  };
3856
5987
  };
3857
5988
  };
@@ -5445,11 +7576,22 @@ export interface paths {
5445
7576
  };
5446
7577
  put?: never;
5447
7578
  /**
5448
- * Create a new user
7579
+ * Create a new user (authenticated)
5449
7580
  * @description Creates a new user following this flow:
5450
7581
  * 1. Creates the user in Keycloak with username, email, password, and profile information
5451
7582
  * 2. Retrieves the generated Keycloak user ID
5452
- * 3. Creates the user in MongoDB using the Keycloak ID as the primary key
7583
+ * 3. Creates the user in the database using the Keycloak ID as the primary key
7584
+ * 4. Associates the user with a group and institution using ONE of two methods:
7585
+ *
7586
+ * **Method 1: Using seatCodeId (recommended)**
7587
+ * - Provide seatCodeId to automatically derive groupId and institutionId from the seat code
7588
+ * - The seat code must be valid, not reserved, and not already in use
7589
+ * - Creates user_group and institution_registration records automatically
7590
+ *
7591
+ * **Method 2: Using groupId + institutionId**
7592
+ * - Provide groupId and institutionId manually
7593
+ * - System will find an available seat_code for the institution + group combination
7594
+ * - Creates user_group and institution_registration records
5453
7595
  *
5454
7596
  * Note: The user ID is automatically generated by Keycloak and should NOT be provided in the request.
5455
7597
  */
@@ -5480,7 +7622,7 @@ export interface paths {
5480
7622
  /** @example +5511999999999 */
5481
7623
  phone?: string;
5482
7624
  /** @example 12345678901 */
5483
- document?: number;
7625
+ document: string;
5484
7626
  /**
5485
7627
  * @example male
5486
7628
  * @enum {string}
@@ -5491,11 +7633,35 @@ export interface paths {
5491
7633
  * @example 1990-01-15T00:00:00.000Z
5492
7634
  */
5493
7635
  birthdate?: string;
7636
+ /**
7637
+ * Format: uuid
7638
+ * @description Optional seat code ID to register the user. When provided, groupId and institutionId
7639
+ * are not required as they will be derived from the seat code's associated seat.
7640
+ * The seat code must be valid, not reserved, and not already in use by another user.
7641
+ * @example 550e8400-e29b-41d4-a716-446655440002
7642
+ */
7643
+ seatCodeId?: string;
7644
+ /**
7645
+ * Format: uuid
7646
+ * @description Optional group ID to associate the user with a group (creates user_group record).
7647
+ * Not required if seatCodeId is provided.
7648
+ * @example 550e8400-e29b-41d4-a716-446655440000
7649
+ */
7650
+ groupId?: string;
7651
+ /**
7652
+ * Format: uuid
7653
+ * @description Optional institution ID to register the user in an institution.
7654
+ * Requires groupId to be provided. Will automatically find and assign
7655
+ * an available seat_code for the institution + group combination.
7656
+ * Not required if seatCodeId is provided.
7657
+ * @example 550e8400-e29b-41d4-a716-446655440001
7658
+ */
7659
+ institutionId?: string;
5494
7660
  };
5495
7661
  };
5496
7662
  };
5497
7663
  responses: {
5498
- /** @description User created successfully in both Keycloak and MongoDB */
7664
+ /** @description User created successfully in both Keycloak and database */
5499
7665
  201: {
5500
7666
  headers: {
5501
7667
  [name: string]: unknown;
@@ -5508,9 +7674,39 @@ export interface paths {
5508
7674
  };
5509
7675
  };
5510
7676
  };
5511
- 400: components["responses"]["BadRequest"];
7677
+ /**
7678
+ * @description Bad request. Possible causes:
7679
+ * - Missing required fields
7680
+ * - institutionId provided without groupId (when not using seatCodeId)
7681
+ * - No seat found for institution + group combination
7682
+ * - No available seat codes for the institution and group
7683
+ * - Seat code not found or already in use
7684
+ * - Seat code is reserved and cannot be used
7685
+ */
7686
+ 400: {
7687
+ headers: {
7688
+ [name: string]: unknown;
7689
+ };
7690
+ content: {
7691
+ "application/json": components["schemas"]["Error"];
7692
+ };
7693
+ };
5512
7694
  401: components["responses"]["Unauthorized"];
5513
- /** @description User already exists (either in Keycloak or MongoDB) */
7695
+ /**
7696
+ * @description Not found. Possible causes:
7697
+ * - Group not found
7698
+ * - Institution not found
7699
+ * - Seat not found for the seat code
7700
+ */
7701
+ 404: {
7702
+ headers: {
7703
+ [name: string]: unknown;
7704
+ };
7705
+ content: {
7706
+ "application/json": components["schemas"]["Error"];
7707
+ };
7708
+ };
7709
+ /** @description User already exists (either in Keycloak or database) */
5514
7710
  409: {
5515
7711
  headers: {
5516
7712
  [name: string]: unknown;
@@ -5782,12 +7978,126 @@ export interface paths {
5782
7978
  /** @description Resource ID */
5783
7979
  id: components["parameters"]["id"];
5784
7980
  };
5785
- cookie?: never;
7981
+ cookie?: never;
7982
+ };
7983
+ requestBody?: never;
7984
+ responses: {
7985
+ /** @description List of user's institutions */
7986
+ 200: {
7987
+ headers: {
7988
+ [name: string]: unknown;
7989
+ };
7990
+ content: {
7991
+ "application/json": {
7992
+ /** @example success */
7993
+ status?: string;
7994
+ data?: components["schemas"]["Institution"][];
7995
+ };
7996
+ };
7997
+ };
7998
+ 400: components["responses"]["BadRequest"];
7999
+ 401: components["responses"]["Unauthorized"];
8000
+ 404: components["responses"]["NotFound"];
8001
+ 500: components["responses"]["ServerError"];
8002
+ };
8003
+ };
8004
+ put?: never;
8005
+ post?: never;
8006
+ delete?: never;
8007
+ options?: never;
8008
+ head?: never;
8009
+ patch?: never;
8010
+ trace?: never;
8011
+ };
8012
+ "/users/register": {
8013
+ parameters: {
8014
+ query?: never;
8015
+ header?: never;
8016
+ path?: never;
8017
+ cookie?: never;
8018
+ };
8019
+ get?: never;
8020
+ put?: never;
8021
+ /**
8022
+ * Public user registration
8023
+ * @description Creates a new user without requiring authentication (public endpoint).
8024
+ * This endpoint has an additional validation: it only allows registration
8025
+ * for groups that are NOT of type "other".
8026
+ *
8027
+ * Allowed group types: student, teacher, school-director
8028
+ * Blocked group type: other
8029
+ *
8030
+ * The group type is validated based on:
8031
+ * - The groupId provided directly, OR
8032
+ * - The group associated with the seatCodeId (derived from seat)
8033
+ *
8034
+ * This endpoint follows the same user creation flow as POST /users,
8035
+ * including Keycloak user creation and optional institution/group associations.
8036
+ */
8037
+ post: {
8038
+ parameters: {
8039
+ query?: never;
8040
+ header?: never;
8041
+ path?: never;
8042
+ cookie?: never;
8043
+ };
8044
+ requestBody: {
8045
+ content: {
8046
+ "application/json": {
8047
+ /** @example John */
8048
+ firstName: string;
8049
+ /** @example Doe */
8050
+ lastName: string;
8051
+ /**
8052
+ * Format: email
8053
+ * @example john.doe@example.com
8054
+ */
8055
+ email: string;
8056
+ /**
8057
+ * @description Password for the user's Keycloak account
8058
+ * @example SecurePassword123!
8059
+ */
8060
+ password: string;
8061
+ /** @example +5511999999999 */
8062
+ phone?: string;
8063
+ /** @example 12345678901 */
8064
+ document: string;
8065
+ /**
8066
+ * @example male
8067
+ * @enum {string}
8068
+ */
8069
+ gender?: "male" | "female" | "other";
8070
+ /**
8071
+ * Format: date-time
8072
+ * @example 1990-01-15T00:00:00.000Z
8073
+ */
8074
+ birthdate?: string;
8075
+ /**
8076
+ * Format: uuid
8077
+ * @description Seat code ID to register the user. When provided, groupId and institutionId
8078
+ * are derived from the seat code. Required if groupId is not provided.
8079
+ * @example 550e8400-e29b-41d4-a716-446655440002
8080
+ */
8081
+ seatCodeId?: string;
8082
+ /**
8083
+ * Format: uuid
8084
+ * @description Group ID to associate the user. Required if seatCodeId is not provided.
8085
+ * The group must NOT be of type "other".
8086
+ * @example 550e8400-e29b-41d4-a716-446655440000
8087
+ */
8088
+ groupId?: string;
8089
+ /**
8090
+ * Format: uuid
8091
+ * @description Institution ID to register the user. Requires groupId.
8092
+ * @example 550e8400-e29b-41d4-a716-446655440001
8093
+ */
8094
+ institutionId?: string;
8095
+ };
8096
+ };
5786
8097
  };
5787
- requestBody?: never;
5788
8098
  responses: {
5789
- /** @description List of user's institutions */
5790
- 200: {
8099
+ /** @description User created successfully */
8100
+ 201: {
5791
8101
  headers: {
5792
8102
  [name: string]: unknown;
5793
8103
  };
@@ -5795,18 +8105,51 @@ export interface paths {
5795
8105
  "application/json": {
5796
8106
  /** @example success */
5797
8107
  status?: string;
5798
- data?: components["schemas"]["Institution"][];
8108
+ data?: components["schemas"]["User"];
5799
8109
  };
5800
8110
  };
5801
8111
  };
5802
- 400: components["responses"]["BadRequest"];
5803
- 401: components["responses"]["Unauthorized"];
5804
- 404: components["responses"]["NotFound"];
8112
+ /**
8113
+ * @description Bad request. Possible causes:
8114
+ * - Missing required fields
8115
+ * - Neither groupId nor seatCodeId provided
8116
+ * - Group type is "other" (not allowed for public registration)
8117
+ * - Seat code not found or already in use
8118
+ * - Seat code is reserved
8119
+ */
8120
+ 400: {
8121
+ headers: {
8122
+ [name: string]: unknown;
8123
+ };
8124
+ content: {
8125
+ "application/json": components["schemas"]["Error"];
8126
+ };
8127
+ };
8128
+ /**
8129
+ * @description Not found. Possible causes:
8130
+ * - Group not found
8131
+ * - Seat not found for the seat code
8132
+ */
8133
+ 404: {
8134
+ headers: {
8135
+ [name: string]: unknown;
8136
+ };
8137
+ content: {
8138
+ "application/json": components["schemas"]["Error"];
8139
+ };
8140
+ };
8141
+ /** @description User already exists (either in Keycloak or database) */
8142
+ 409: {
8143
+ headers: {
8144
+ [name: string]: unknown;
8145
+ };
8146
+ content: {
8147
+ "application/json": components["schemas"]["Error"];
8148
+ };
8149
+ };
5805
8150
  500: components["responses"]["ServerError"];
5806
8151
  };
5807
8152
  };
5808
- put?: never;
5809
- post?: never;
5810
8153
  delete?: never;
5811
8154
  options?: never;
5812
8155
  head?: never;
@@ -5898,28 +8241,28 @@ export interface components {
5898
8241
  * Format: uuid
5899
8242
  * @description Keycloak User ID
5900
8243
  */
5901
- id?: string;
8244
+ id: string;
5902
8245
  /** @example John */
5903
- firstName?: string;
8246
+ firstName: string;
5904
8247
  /** @example Doe */
5905
- lastName?: string;
8248
+ lastName: string;
5906
8249
  /**
5907
8250
  * Format: email
5908
8251
  * @example john.doe@example.com
5909
8252
  */
5910
- email?: string;
8253
+ email: string;
5911
8254
  /** @example +5511999999999 */
5912
8255
  phone?: string | null;
5913
8256
  /** @example 12345678901 */
5914
- document?: number | null;
8257
+ document: string;
5915
8258
  /** @enum {string|null} */
5916
8259
  gender?: "male" | "female" | "other" | null;
5917
8260
  /** Format: date-time */
5918
8261
  birthdate?: string | null;
5919
8262
  /** Format: date-time */
5920
- createdAt?: string;
8263
+ createdAt: string;
5921
8264
  /** Format: date-time */
5922
- updatedAt?: string;
8265
+ updatedAt: string;
5923
8266
  /** @description User's group associations */
5924
8267
  userGroups?: components["schemas"]["UserGroup"][];
5925
8268
  /** @description User's guardian associations */
@@ -5965,24 +8308,24 @@ export interface components {
5965
8308
  * Format: uuid
5966
8309
  * @description Keycloak Group ID
5967
8310
  */
5968
- id?: string;
8311
+ id: string;
5969
8312
  /** @example students */
5970
- name?: string;
8313
+ name: string;
5971
8314
  /**
5972
8315
  * @description If true, group is automatically associated when creating institutions
5973
8316
  * @example false
5974
8317
  */
5975
- isDefault?: boolean;
8318
+ isDefault: boolean;
5976
8319
  /**
5977
8320
  * @description Type of the group
5978
8321
  * @example student
5979
8322
  * @enum {string}
5980
8323
  */
5981
- type?: "student" | "teacher" | "school-director" | "other";
8324
+ type: "student" | "teacher" | "school-director" | "other";
5982
8325
  /** Format: date-time */
5983
- createdAt?: string;
8326
+ createdAt: string;
5984
8327
  /** Format: date-time */
5985
- updatedAt?: string;
8328
+ updatedAt: string;
5986
8329
  };
5987
8330
  CreateGroupDto: {
5988
8331
  /** @example students */
@@ -6020,19 +8363,19 @@ export interface components {
6020
8363
  };
6021
8364
  UserGroup: {
6022
8365
  /** Format: uuid */
6023
- id?: string;
8366
+ id: string;
6024
8367
  /** Format: uuid */
6025
- userId?: string;
8368
+ userId: string;
6026
8369
  /** Format: uuid */
6027
- groupId?: string;
8370
+ groupId: string;
6028
8371
  /** Format: date-time */
6029
- assignedAt?: string;
8372
+ assignedAt: string;
6030
8373
  /** Format: uuid */
6031
8374
  assignedBy?: string | null;
6032
8375
  /** Format: date-time */
6033
- createdAt?: string;
8376
+ createdAt: string;
6034
8377
  /** Format: date-time */
6035
- updatedAt?: string;
8378
+ updatedAt: string;
6036
8379
  group?: components["schemas"]["Group"];
6037
8380
  };
6038
8381
  UserGuardian: {
@@ -6086,6 +8429,8 @@ export interface components {
6086
8429
  * @example 5
6087
8430
  */
6088
8431
  certificatesCount?: number;
8432
+ /** @description User's group associations */
8433
+ userGroups?: components["schemas"]["UserGroup"][];
6089
8434
  /** @description User's guardian associations */
6090
8435
  userGuardians?: {
6091
8436
  /** Format: uuid */
@@ -6113,6 +8458,11 @@ export interface components {
6113
8458
  * @example true
6114
8459
  */
6115
8460
  isActive?: boolean;
8461
+ /**
8462
+ * Format: date-time
8463
+ * @description Date when the user was registered in the institution
8464
+ */
8465
+ createdAt?: string;
6116
8466
  /** @description Classroom assignment details */
6117
8467
  institutionClassroom?: {
6118
8468
  /** Format: uuid */
@@ -6153,19 +8503,28 @@ export interface components {
6153
8503
  meta?: components["schemas"]["PaginationMeta"];
6154
8504
  };
6155
8505
  InstitutionRegistration: {
6156
- /** Format: uuid */
8506
+ /**
8507
+ * Format: uuid
8508
+ * @description Unique identifier
8509
+ */
6157
8510
  id?: string;
6158
- /** Format: uuid */
8511
+ /**
8512
+ * Format: uuid
8513
+ * @description User ID
8514
+ */
6159
8515
  userId?: string;
6160
- /** Format: uuid */
8516
+ /**
8517
+ * Format: uuid
8518
+ * @description Institution ID
8519
+ */
6161
8520
  institutionId?: string;
6162
8521
  /**
6163
8522
  * Format: uuid
6164
- * @description ID of the institution classroom assignment
8523
+ * @description Classroom ID
6165
8524
  */
6166
8525
  institutionClassroomId?: string | null;
6167
8526
  /**
6168
- * @description Indicates if the user is active in the institution
8527
+ * @description Whether the registration is active
6169
8528
  * @example true
6170
8529
  */
6171
8530
  isActive?: boolean;
@@ -6177,6 +8536,13 @@ export interface components {
6177
8536
  institution?: components["schemas"]["Institution"];
6178
8537
  /** @description Classroom assignment with complete details (classroom, shift, serie) */
6179
8538
  institutionClassroom?: components["schemas"]["InstitutionClassroom"];
8539
+ /**
8540
+ * Format: uuid
8541
+ * @description Seat Code ID
8542
+ */
8543
+ seatCodeId?: string;
8544
+ user?: components["schemas"]["User"];
8545
+ seatCode?: components["schemas"]["SeatCode"];
6180
8546
  };
6181
8547
  InstitutionClassroom: {
6182
8548
  /** Format: uuid */
@@ -6207,9 +8573,9 @@ export interface components {
6207
8573
  * Format: uuid
6208
8574
  * @description Keycloak Role ID
6209
8575
  */
6210
- id?: string;
8576
+ id: string;
6211
8577
  /** @example admin */
6212
- name?: string;
8578
+ name: string;
6213
8579
  /**
6214
8580
  * @description Role description
6215
8581
  * @example Administrator role with full permissions
@@ -6223,9 +8589,9 @@ export interface components {
6223
8589
  /** @description Application details if this is a client role */
6224
8590
  application?: components["schemas"]["Application"];
6225
8591
  /** Format: date-time */
6226
- createdAt?: string;
8592
+ createdAt: string;
6227
8593
  /** Format: date-time */
6228
- updatedAt?: string;
8594
+ updatedAt: string;
6229
8595
  };
6230
8596
  CreateRoleDto: {
6231
8597
  /** @example admin */
@@ -6253,20 +8619,20 @@ export interface components {
6253
8619
  };
6254
8620
  Institution: {
6255
8621
  /** Format: uuid */
6256
- id?: string;
8622
+ id: string;
6257
8623
  /** @example Academe Institution */
6258
- name?: string;
8624
+ name: string;
6259
8625
  /** @example SCH001 */
6260
- code?: string;
8626
+ code: string;
6261
8627
  /** @example 12.345.678/0001-90 */
6262
- document?: string;
8628
+ document: string;
6263
8629
  /** Format: email */
6264
- email?: string;
8630
+ email: string;
6265
8631
  phone?: string | null;
6266
8632
  /** @example 500 */
6267
- maxStudents?: number;
8633
+ maxStudents: number;
6268
8634
  /** @example true */
6269
- isActive?: boolean;
8635
+ isActive: boolean;
6270
8636
  /** Format: uri */
6271
8637
  logoUrl?: string | null;
6272
8638
  /** Format: uri */
@@ -6276,9 +8642,9 @@ export interface components {
6276
8642
  /** Format: uuid */
6277
8643
  institutionRewardId?: string | null;
6278
8644
  /** Format: date-time */
6279
- createdAt?: string;
8645
+ createdAt: string;
6280
8646
  /** Format: date-time */
6281
- updatedAt?: string;
8647
+ updatedAt: string;
6282
8648
  };
6283
8649
  Organization: {
6284
8650
  /** Format: uuid */
@@ -6363,36 +8729,40 @@ export interface components {
6363
8729
  };
6364
8730
  Certificate: {
6365
8731
  /** Format: uuid */
6366
- id?: string;
6367
- /** Format: uuid */
6368
- userId?: string;
6369
- /** Format: uuid */
6370
- courseId?: string | null;
8732
+ id: string;
6371
8733
  /** Format: uuid */
6372
- courseModuleId?: string | null;
6373
- quizId?: string | null;
6374
- quizTitle?: string | null;
6375
- quizCategory?: string | null;
6376
- attemptId?: string | null;
6377
- attemptScore?: number | null;
6378
- attemptPassed?: boolean | null;
6379
- attemptTimeTakenInMinutes?: number | null;
6380
- /** Format: date-time */
6381
- attemptCompletedAt?: string | null;
6382
- certificateId?: string | null;
6383
- certificateNumber?: string | null;
6384
- /** Format: date-time */
6385
- certificateIssuedAt?: string | null;
6386
- /** Format: uri */
6387
- certificateDownloadUrl?: string | null;
6388
- /** Format: date-time */
6389
- dispatchedAt?: string | null;
6390
- /** Format: date-time */
6391
- insertedAt?: string | null;
8734
+ userId: string;
8735
+ /**
8736
+ * Format: uuid
8737
+ * @description Quiz attempt that generated the certificate
8738
+ */
8739
+ quizAttemptId?: string | null;
8740
+ /**
8741
+ * Format: uuid
8742
+ * @description Certificate template used
8743
+ */
8744
+ certificateTemplateId: string;
8745
+ /**
8746
+ * @description Unique certificate number
8747
+ * @example CERT-2024-000001
8748
+ */
8749
+ certificateNumber: string;
8750
+ /**
8751
+ * Format: uri
8752
+ * @description URL of the generated certificate PDF
8753
+ * @example https://example.com/certificates/cert-123.pdf
8754
+ */
8755
+ url?: string | null;
6392
8756
  /** Format: date-time */
6393
- createdAt?: string;
8757
+ createdAt: string;
6394
8758
  /** Format: date-time */
6395
- updatedAt?: string;
8759
+ updatedAt: string;
8760
+ /** @description User who received the certificate */
8761
+ user?: components["schemas"]["User"];
8762
+ /** @description Quiz attempt details (if applicable) */
8763
+ quizAttempt?: components["schemas"]["QuizAttempt"];
8764
+ /** @description Template used for the certificate */
8765
+ certificateTemplate?: components["schemas"]["CertificateTemplate"];
6396
8766
  };
6397
8767
  Guardian: {
6398
8768
  /** Format: uuid */
@@ -6487,6 +8857,16 @@ export interface components {
6487
8857
  name: string;
6488
8858
  /** @description Application description */
6489
8859
  description?: string | null;
8860
+ /**
8861
+ * @description JSON object with application settings and rules
8862
+ * @example {
8863
+ * "mike": {
8864
+ * "enabled": true,
8865
+ * "daily_limit": 60
8866
+ * }
8867
+ * }
8868
+ */
8869
+ settings?: Record<string, never>;
6490
8870
  /** Format: date-time */
6491
8871
  createdAt?: string;
6492
8872
  /** Format: date-time */
@@ -6499,12 +8879,24 @@ export interface components {
6499
8879
  name: string;
6500
8880
  /** @description Application description */
6501
8881
  description?: string;
8882
+ /**
8883
+ * @description JSON object with application settings
8884
+ * @example {
8885
+ * "mike": {
8886
+ * "enabled": true,
8887
+ * "daily_limit": 60
8888
+ * }
8889
+ * }
8890
+ */
8891
+ settings?: Record<string, never>;
6502
8892
  };
6503
8893
  UpdateApplicationDto: {
6504
8894
  /** @description Application name */
6505
8895
  name?: string;
6506
8896
  /** @description Application description */
6507
8897
  description?: string;
8898
+ /** @description JSON object with application settings */
8899
+ settings?: Record<string, never>;
6508
8900
  };
6509
8901
  AuthenticatedUser: {
6510
8902
  /** @description Keycloak user ID */
@@ -6537,23 +8929,166 @@ export interface components {
6537
8929
  };
6538
8930
  };
6539
8931
  };
6540
- CreateInstitutionClassroomDto: {
8932
+ CreateInstitutionClassroomDto: {
8933
+ /**
8934
+ * Format: uuid
8935
+ * @description Classroom ID to associate with the institution
8936
+ */
8937
+ classroomId: string;
8938
+ /**
8939
+ * @description Whether the classroom is active in the institution
8940
+ * @default true
8941
+ */
8942
+ isActive: boolean;
8943
+ };
8944
+ UpdateInstitutionClassroomDto: {
8945
+ /** @description Whether the classroom is active in the institution */
8946
+ isActive?: boolean;
8947
+ };
8948
+ CreateInstitutionRegistrationDto: {
8949
+ /**
8950
+ * Format: uuid
8951
+ * @description User ID to register in the institution
8952
+ */
8953
+ userId: string;
8954
+ /** @description The seat code to redeem for registration */
8955
+ seatCode: string;
8956
+ /**
8957
+ * Format: uuid
8958
+ * @description Optional classroom ID to assign the user to
8959
+ */
8960
+ institutionClassroomId?: string | null;
8961
+ /**
8962
+ * @description Whether the registration is active
8963
+ * @default true
8964
+ */
8965
+ isActive: boolean;
8966
+ };
8967
+ UpdateInstitutionRegistrationDto: {
8968
+ /**
8969
+ * Format: uuid
8970
+ * @description Classroom ID to assign the user to (null to remove)
8971
+ */
8972
+ institutionClassroomId?: string | null;
8973
+ /** @description Whether the registration is active */
8974
+ isActive?: boolean;
8975
+ };
8976
+ AssignClassroomDto: {
8977
+ /**
8978
+ * Format: uuid
8979
+ * @description Classroom ID to assign the user to (null to remove assignment)
8980
+ */
8981
+ institutionClassroomId?: string | null;
8982
+ };
8983
+ /** @description Seat with institution data included */
8984
+ SeatWithInstitution: {
8985
+ /** Format: uuid */
8986
+ id?: string;
8987
+ name?: string;
8988
+ description?: string;
8989
+ /** Format: uuid */
8990
+ institutionId?: string;
8991
+ /** Format: uuid */
8992
+ groupId?: string;
8993
+ availableQuantity?: number;
8994
+ /** Format: date-time */
8995
+ createdAt?: string;
8996
+ /** Format: date-time */
8997
+ updatedAt?: string;
8998
+ group?: components["schemas"]["Group"];
8999
+ institution?: components["schemas"]["Institution"];
9000
+ };
9001
+ /** @description Seat code with seat and institution data included */
9002
+ SeatCodeWithInstitution: {
9003
+ /**
9004
+ * Format: uuid
9005
+ * @description Unique identifier
9006
+ */
9007
+ id?: string;
9008
+ /** @description Unique seat code */
9009
+ code?: string;
9010
+ /**
9011
+ * Format: uuid
9012
+ * @description Seat ID this code belongs to
9013
+ */
9014
+ seatId?: string;
9015
+ /** @description Whether the code is reserved (used) */
9016
+ isReserved?: boolean;
9017
+ /** Format: date-time */
9018
+ createdAt?: string;
9019
+ seat?: components["schemas"]["SeatWithInstitution"];
9020
+ };
9021
+ /** @description User associated with the registration */
9022
+ SeatCodeRegistrationUser: {
9023
+ /** Format: uuid */
9024
+ id?: string;
9025
+ /** @description User's first name */
9026
+ firstName?: string;
9027
+ /** @description User's last name */
9028
+ lastName?: string;
9029
+ /** Format: email */
9030
+ email?: string;
9031
+ } | null;
9032
+ /** @description Institution registration associated with this seat code (if reserved) */
9033
+ SeatCodeRegistration: {
9034
+ /** Format: uuid */
9035
+ id?: string;
9036
+ /** Format: uuid */
9037
+ userId?: string;
9038
+ /** Format: uuid */
9039
+ institutionId?: string;
9040
+ isActive?: boolean;
9041
+ /** Format: date-time */
9042
+ createdAt?: string;
9043
+ user?: components["schemas"]["SeatCodeRegistrationUser"];
9044
+ } | null;
9045
+ SeatCode: {
9046
+ /**
9047
+ * Format: uuid
9048
+ * @description Unique identifier
9049
+ */
9050
+ id?: string;
9051
+ /** @description Unique seat code */
9052
+ code?: string;
9053
+ /**
9054
+ * Format: uuid
9055
+ * @description Seat ID this code belongs to
9056
+ */
9057
+ seatId?: string;
9058
+ /** @description Whether the code is reserved (used) */
9059
+ isReserved?: boolean;
9060
+ /** Format: date-time */
9061
+ createdAt?: string;
9062
+ seat?: components["schemas"]["Seats"];
9063
+ institutionRegistration?: components["schemas"]["SeatCodeRegistration"];
9064
+ };
9065
+ CreateSeatCodesDto: {
6541
9066
  /**
6542
9067
  * Format: uuid
6543
- * @description Classroom ID to associate with the institution
9068
+ * @description Seat ID to generate codes for
6544
9069
  */
6545
- classroomId: string;
9070
+ seatId: string;
9071
+ /** @description Number of codes to generate */
9072
+ quantity: number;
9073
+ };
9074
+ SendCodeDto: {
9075
+ /** @description Phone number to send the license link via WhatsApp */
9076
+ phone: string;
9077
+ /** @description Name of the recipient (optional) */
9078
+ name?: string;
9079
+ /** @description Seat code string to send (optional). If not provided, will find an available code from the seatId */
9080
+ code?: string;
6546
9081
  /**
6547
- * @description Whether the classroom is active in the institution
6548
- * @default true
9082
+ * Format: uuid
9083
+ * @description Seat ID to find an available code from (optional). Required if code is not provided
6549
9084
  */
6550
- isActive: boolean;
9085
+ seatId?: string;
6551
9086
  };
6552
- UpdateInstitutionClassroomDto: {
6553
- /** @description Whether the classroom is active in the institution */
6554
- isActive?: boolean;
9087
+ UpdateSeatCodeDto: {
9088
+ /** @description Whether the code is reserved */
9089
+ isReserved?: boolean;
6555
9090
  };
6556
- InstitutionGroup: {
9091
+ Seats: {
6557
9092
  /**
6558
9093
  * Format: uuid
6559
9094
  * @description Unique identifier
@@ -6563,68 +9098,108 @@ export interface components {
6563
9098
  * Format: uuid
6564
9099
  * @description Institution ID
6565
9100
  */
6566
- institutionId?: string;
9101
+ institutionId?: string | null;
6567
9102
  /**
6568
9103
  * Format: uuid
6569
9104
  * @description Group ID
6570
9105
  */
6571
9106
  groupId?: string;
9107
+ /**
9108
+ * Format: uuid
9109
+ * @description Product ID associated with this seat
9110
+ */
9111
+ productId?: string;
6572
9112
  /** @description Available quantity for this group in the institution */
6573
9113
  availableQuantity?: number;
9114
+ /** @description Number of users currently assigned to this group in the institution */
9115
+ usedQuantity?: number;
6574
9116
  /** Format: date-time */
6575
9117
  createdAt?: string;
6576
9118
  /** Format: date-time */
6577
9119
  updatedAt?: string;
6578
9120
  group?: components["schemas"]["Group"];
9121
+ product?: components["schemas"]["Product"];
6579
9122
  };
6580
- CreateInstitutionGroupDto: {
9123
+ CreateSeatsDto: {
6581
9124
  /**
6582
9125
  * Format: uuid
6583
9126
  * @description Group ID to associate with the institution
6584
9127
  */
6585
9128
  groupId: string;
9129
+ /**
9130
+ * Format: uuid
9131
+ * @description Product ID to associate with the seat
9132
+ */
9133
+ productId: string;
6586
9134
  /**
6587
9135
  * @description Available quantity for this group
6588
9136
  * @default 0
6589
9137
  */
6590
9138
  availableQuantity: number;
6591
9139
  };
6592
- UpdateInstitutionGroupDto: {
9140
+ UpdateSeatsDto: {
6593
9141
  /** @description New available quantity for this group */
6594
9142
  availableQuantity: number;
6595
9143
  };
6596
- CreateInstitutionRegistrationDto: {
9144
+ /**
9145
+ * @example {
9146
+ * "id": "550e8400-e29b-41d4-a716-446655440000",
9147
+ * "name": "Premium Plan",
9148
+ * "description": "Full access to all platform features",
9149
+ * "createdAt": "2024-01-15T10:30:00Z",
9150
+ * "updatedAt": "2024-01-15T10:30:00Z"
9151
+ * }
9152
+ */
9153
+ Product: {
6597
9154
  /**
6598
9155
  * Format: uuid
6599
- * @description User ID to register in the institution
9156
+ * @description Unique identifier of the product
6600
9157
  */
6601
- userId: string;
9158
+ id?: string;
9159
+ /** @description Name of the product */
9160
+ name?: string;
9161
+ /** @description Description of the product */
9162
+ description?: string | null;
6602
9163
  /**
6603
- * Format: uuid
6604
- * @description Optional classroom ID to assign the user to
9164
+ * Format: date-time
9165
+ * @description Creation timestamp
6605
9166
  */
6606
- institutionClassroomId?: string | null;
9167
+ createdAt?: string;
6607
9168
  /**
6608
- * @description Whether the registration is active
6609
- * @default true
9169
+ * Format: date-time
9170
+ * @description Last update timestamp
6610
9171
  */
6611
- isActive: boolean;
9172
+ updatedAt?: string;
6612
9173
  };
6613
- UpdateInstitutionRegistrationDto: {
9174
+ /**
9175
+ * @example {
9176
+ * "id": "550e8400-e29b-41d4-a716-446655440000",
9177
+ * "name": "Premium Plan",
9178
+ * "description": "Full access to all platform features"
9179
+ * }
9180
+ */
9181
+ CreateProductDto: {
6614
9182
  /**
6615
9183
  * Format: uuid
6616
- * @description Classroom ID to assign the user to (null to remove)
9184
+ * @description Optional custom UUID for the product (auto-generated if not provided)
6617
9185
  */
6618
- institutionClassroomId?: string | null;
6619
- /** @description Whether the registration is active */
6620
- isActive?: boolean;
9186
+ id?: string;
9187
+ /** @description Name of the product */
9188
+ name: string;
9189
+ /** @description Description of the product */
9190
+ description?: string;
6621
9191
  };
6622
- AssignClassroomDto: {
6623
- /**
6624
- * Format: uuid
6625
- * @description Classroom ID to assign the user to (null to remove assignment)
6626
- */
6627
- institutionClassroomId?: string | null;
9192
+ /**
9193
+ * @example {
9194
+ * "name": "Premium Plan Updated",
9195
+ * "description": "Updated description"
9196
+ * }
9197
+ */
9198
+ UpdateProductDto: {
9199
+ /** @description Name of the product */
9200
+ name?: string;
9201
+ /** @description Description of the product */
9202
+ description?: string;
6628
9203
  };
6629
9204
  StudentWithClass: {
6630
9205
  /** Format: uuid */
@@ -6710,11 +9285,6 @@ export interface components {
6710
9285
  year?: number;
6711
9286
  };
6712
9287
  CreateUserDto: {
6713
- /**
6714
- * Format: uuid
6715
- * @description Keycloak User ID
6716
- */
6717
- id: string;
6718
9288
  /** @example John */
6719
9289
  firstName: string;
6720
9290
  /** @example Doe */
@@ -6724,10 +9294,15 @@ export interface components {
6724
9294
  * @example john.doe@example.com
6725
9295
  */
6726
9296
  email: string;
9297
+ /**
9298
+ * @description Password for the user's Keycloak account
9299
+ * @example SecurePassword123!
9300
+ */
9301
+ password: string;
6727
9302
  /** @example +5511999999999 */
6728
9303
  phone?: string;
6729
9304
  /** @example 12345678901 */
6730
- document?: number;
9305
+ document: string;
6731
9306
  /**
6732
9307
  * @example male
6733
9308
  * @enum {string}
@@ -6738,6 +9313,24 @@ export interface components {
6738
9313
  * @example 1990-01-01T00:00:00Z
6739
9314
  */
6740
9315
  birthdate?: string;
9316
+ /**
9317
+ * Format: uuid
9318
+ * @description Optional group ID to associate the user with a group
9319
+ * @example 550e8400-e29b-41d4-a716-446655440000
9320
+ */
9321
+ groupId?: string;
9322
+ /**
9323
+ * Format: uuid
9324
+ * @description Optional institution ID to register the user (requires groupId)
9325
+ * @example 550e8400-e29b-41d4-a716-446655440001
9326
+ */
9327
+ institutionId?: string;
9328
+ /**
9329
+ * Format: uuid
9330
+ * @description Optional guardian ID to associate the user with a guardian
9331
+ * @example 550e8400-e29b-41d4-a716-446655440002
9332
+ */
9333
+ guardianId?: string;
6741
9334
  };
6742
9335
  UserResponse: components["schemas"]["User"];
6743
9336
  CreateInstitutionDto: {
@@ -6860,40 +9453,25 @@ export interface components {
6860
9453
  /** Format: uuid */
6861
9454
  userId: string;
6862
9455
  /** Format: uuid */
6863
- courseId?: string;
9456
+ quizAttemptId?: string;
6864
9457
  /** Format: uuid */
6865
- courseModuleId?: string;
6866
- quizId?: string;
6867
- quizTitle?: string;
6868
- quizCategory?: string;
6869
- attemptId?: string;
6870
- attemptScore?: number;
6871
- attemptPassed?: boolean;
6872
- attemptTimeTakenInMinutes?: number;
6873
- /** Format: date-time */
6874
- attemptCompletedAt?: string;
6875
- certificateId?: string;
6876
- certificateNumber?: string;
6877
- /** Format: date-time */
6878
- certificateIssuedAt?: string;
6879
- /** Format: uri */
6880
- certificateDownloadUrl?: string;
9458
+ certificateTemplateId: string;
9459
+ /** @example CERT-2024-000001 */
9460
+ certificateNumber: string;
9461
+ /**
9462
+ * Format: uri
9463
+ * @example https://example.com/certificates/cert-123.pdf
9464
+ */
9465
+ url?: string;
6881
9466
  };
6882
9467
  UpdateCertificateDto: {
6883
- quizTitle?: string;
6884
- quizCategory?: string;
6885
- attemptScore?: number;
6886
- attemptPassed?: boolean;
6887
- attemptTimeTakenInMinutes?: number;
6888
- /** Format: date-time */
6889
- attemptCompletedAt?: string;
9468
+ /** Format: uuid */
9469
+ quizAttemptId?: string;
9470
+ /** Format: uuid */
9471
+ certificateTemplateId?: string;
6890
9472
  certificateNumber?: string;
6891
- /** Format: date-time */
6892
- certificateIssuedAt?: string;
6893
9473
  /** Format: uri */
6894
- certificateDownloadUrl?: string;
6895
- /** Format: date-time */
6896
- dispatchedAt?: string;
9474
+ url?: string;
6897
9475
  };
6898
9476
  CreateGuardianDto: {
6899
9477
  /**
@@ -6981,6 +9559,275 @@ export interface components {
6981
9559
  /** Format: uuid */
6982
9560
  institutionId: string;
6983
9561
  };
9562
+ Quiz: {
9563
+ /** Format: uuid */
9564
+ id?: string;
9565
+ /** Format: uuid */
9566
+ courseId?: string;
9567
+ /** @example JavaScript Fundamentals Quiz */
9568
+ title?: string;
9569
+ /** @example Test your knowledge of JavaScript basics */
9570
+ description?: string;
9571
+ /**
9572
+ * @default 70
9573
+ * @example 70
9574
+ */
9575
+ passingScore: number;
9576
+ /**
9577
+ * @description Time limit in minutes
9578
+ * @example 60
9579
+ */
9580
+ timeLimit?: number;
9581
+ /** @example 3 */
9582
+ maxAttempts?: number;
9583
+ /** @default false */
9584
+ randomizeQuestions: boolean;
9585
+ /** @default true */
9586
+ showCorrectAnswers: boolean;
9587
+ /** @default true */
9588
+ isActive: boolean;
9589
+ /** Format: uuid */
9590
+ createdBy?: string;
9591
+ /** Format: date-time */
9592
+ createdAt?: string;
9593
+ /** Format: date-time */
9594
+ updatedAt?: string;
9595
+ };
9596
+ CreateQuizDto: {
9597
+ /** Format: uuid */
9598
+ courseId?: string;
9599
+ /** @example JavaScript Fundamentals Quiz */
9600
+ title: string;
9601
+ /** @example Test your knowledge of JavaScript basics */
9602
+ description?: string;
9603
+ /** @example 70 */
9604
+ passingScore?: number;
9605
+ /** @example 60 */
9606
+ timeLimit?: number;
9607
+ /** @example 3 */
9608
+ maxAttempts?: number;
9609
+ randomizeQuestions?: boolean;
9610
+ showCorrectAnswers?: boolean;
9611
+ isActive?: boolean;
9612
+ /** Format: uuid */
9613
+ createdBy: string;
9614
+ };
9615
+ UpdateQuizDto: {
9616
+ /** Format: uuid */
9617
+ courseId?: string;
9618
+ title?: string;
9619
+ description?: string;
9620
+ passingScore?: number;
9621
+ timeLimit?: number;
9622
+ maxAttempts?: number;
9623
+ randomizeQuestions?: boolean;
9624
+ showCorrectAnswers?: boolean;
9625
+ isActive?: boolean;
9626
+ };
9627
+ QuizQuestion: {
9628
+ /** Format: uuid */
9629
+ id?: string;
9630
+ /** Format: uuid */
9631
+ quizId?: string;
9632
+ /** @example What is a closure in JavaScript? */
9633
+ text?: string;
9634
+ /**
9635
+ * @example multiple_choice
9636
+ * @enum {string}
9637
+ */
9638
+ type?: "multiple_choice" | "true_false" | "open";
9639
+ /**
9640
+ * @default 1
9641
+ * @example 1
9642
+ */
9643
+ order: number;
9644
+ /**
9645
+ * @default 1
9646
+ * @example 1
9647
+ */
9648
+ points: number;
9649
+ /** Format: date-time */
9650
+ createdAt?: string;
9651
+ /** Format: date-time */
9652
+ updatedAt?: string;
9653
+ };
9654
+ CreateQuizQuestionDto: {
9655
+ /** Format: uuid */
9656
+ quizId: string;
9657
+ /** @example What is a closure in JavaScript? */
9658
+ text: string;
9659
+ /**
9660
+ * @example multiple_choice
9661
+ * @enum {string}
9662
+ */
9663
+ type: "multiple_choice" | "true_false" | "open";
9664
+ order?: number;
9665
+ points?: number;
9666
+ };
9667
+ UpdateQuizQuestionDto: {
9668
+ text?: string;
9669
+ /** @enum {string} */
9670
+ type?: "multiple_choice" | "true_false" | "open";
9671
+ order?: number;
9672
+ points?: number;
9673
+ };
9674
+ QuizQuestionAnswer: {
9675
+ /** Format: uuid */
9676
+ id?: string;
9677
+ /** Format: uuid */
9678
+ questionId?: string;
9679
+ /** @example A closure is a function that has access to its outer function scope */
9680
+ answer?: string;
9681
+ /** @example true */
9682
+ isCorrect?: boolean;
9683
+ /** Format: date-time */
9684
+ createdAt?: string;
9685
+ /** Format: date-time */
9686
+ updatedAt?: string;
9687
+ };
9688
+ CreateQuizQuestionAnswerDto: {
9689
+ /** Format: uuid */
9690
+ questionId: string;
9691
+ /** @example A closure is a function that has access to its outer function scope */
9692
+ answer: string;
9693
+ /** @example true */
9694
+ isCorrect: boolean;
9695
+ };
9696
+ UpdateQuizQuestionAnswerDto: {
9697
+ answer?: string;
9698
+ isCorrect?: boolean;
9699
+ };
9700
+ QuizAttempt: {
9701
+ /** Format: uuid */
9702
+ id?: string;
9703
+ /** Format: uuid */
9704
+ quizId?: string;
9705
+ /** Format: uuid */
9706
+ userId?: string;
9707
+ /**
9708
+ * @default 0
9709
+ * @example 85
9710
+ */
9711
+ score: number;
9712
+ /**
9713
+ * @default false
9714
+ * @example true
9715
+ */
9716
+ passed: boolean;
9717
+ /** Format: date-time */
9718
+ startedAt?: string;
9719
+ /** Format: date-time */
9720
+ completedAt?: string;
9721
+ /** Format: date-time */
9722
+ createdAt?: string;
9723
+ /** Format: date-time */
9724
+ updatedAt?: string;
9725
+ };
9726
+ CreateQuizAttemptDto: {
9727
+ /** Format: uuid */
9728
+ quizId: string;
9729
+ /** Format: uuid */
9730
+ userId: string;
9731
+ score?: number;
9732
+ passed?: boolean;
9733
+ /** Format: date-time */
9734
+ startedAt?: string;
9735
+ };
9736
+ UpdateQuizAttemptDto: {
9737
+ score?: number;
9738
+ passed?: boolean;
9739
+ /** Format: date-time */
9740
+ completedAt?: string;
9741
+ };
9742
+ QuizAttemptAnswer: {
9743
+ /** Format: uuid */
9744
+ id?: string;
9745
+ /** Format: uuid */
9746
+ quizAttemptId?: string;
9747
+ /** Format: uuid */
9748
+ quizQuestionAnswerId?: string;
9749
+ /** Format: date-time */
9750
+ createdAt?: string;
9751
+ /** Format: date-time */
9752
+ updatedAt?: string;
9753
+ };
9754
+ CreateQuizAttemptAnswerDto: {
9755
+ /** Format: uuid */
9756
+ quizAttemptId: string;
9757
+ /** Format: uuid */
9758
+ quizQuestionAnswerId: string;
9759
+ };
9760
+ CertificateTemplate: {
9761
+ /** Format: uuid */
9762
+ id?: string;
9763
+ /** @example Default Certificate Template */
9764
+ name?: string;
9765
+ /** @example Standard certificate template for course completion */
9766
+ description?: string;
9767
+ /**
9768
+ * @example {
9769
+ * "background_image_url": "https://example.com/bg.png",
9770
+ * "logo_url": "https://example.com/logo.png",
9771
+ * "text_color": "#000000",
9772
+ * "font_family": "Arial"
9773
+ * }
9774
+ */
9775
+ templateData?: {
9776
+ [key: string]: unknown;
9777
+ };
9778
+ /** @default false */
9779
+ isDefault: boolean;
9780
+ /** Format: uuid */
9781
+ quizId?: string;
9782
+ /** Format: uuid */
9783
+ courseId?: string;
9784
+ /** Format: uuid */
9785
+ organizationId?: string;
9786
+ /** Format: uuid */
9787
+ institutionId?: string;
9788
+ /** @default true */
9789
+ isActive: boolean;
9790
+ /** Format: date-time */
9791
+ createdAt?: string;
9792
+ /** Format: date-time */
9793
+ updatedAt?: string;
9794
+ };
9795
+ CreateCertificateTemplateDto: {
9796
+ /** @example Default Certificate Template */
9797
+ name: string;
9798
+ /** @example Standard certificate template for course completion */
9799
+ description?: string;
9800
+ templateData?: {
9801
+ [key: string]: unknown;
9802
+ };
9803
+ isDefault?: boolean;
9804
+ /** Format: uuid */
9805
+ quizId?: string;
9806
+ /** Format: uuid */
9807
+ courseId?: string;
9808
+ /** Format: uuid */
9809
+ organizationId?: string;
9810
+ /** Format: uuid */
9811
+ institutionId?: string;
9812
+ isActive?: boolean;
9813
+ };
9814
+ UpdateCertificateTemplateDto: {
9815
+ name?: string;
9816
+ description?: string;
9817
+ templateData?: {
9818
+ [key: string]: unknown;
9819
+ };
9820
+ isDefault?: boolean;
9821
+ /** Format: uuid */
9822
+ quizId?: string;
9823
+ /** Format: uuid */
9824
+ courseId?: string;
9825
+ /** Format: uuid */
9826
+ organizationId?: string;
9827
+ /** Format: uuid */
9828
+ institutionId?: string;
9829
+ isActive?: boolean;
9830
+ };
6984
9831
  };
6985
9832
  responses: {
6986
9833
  /** @description Resource not found */