academe-kit 0.3.7 → 0.3.8

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,8 +3697,865 @@ 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: {
@@ -3669,7 +4566,1208 @@ export interface paths {
3669
4566
  type?: string;
3670
4567
  /** @description Filter by active status */
3671
4568
  isActive?: boolean;
3672
- /** @description Search in organization name */
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
+ "/plans": {
4764
+ parameters: {
4765
+ query?: never;
4766
+ header?: never;
4767
+ path?: never;
4768
+ cookie?: never;
4769
+ };
4770
+ /**
4771
+ * Get all plans
4772
+ * @description Retrieve a list of all subscription plans
4773
+ */
4774
+ get: {
4775
+ parameters: {
4776
+ query?: {
4777
+ /** @description Search plans by name or code */
4778
+ search?: string;
4779
+ };
4780
+ header?: never;
4781
+ path?: never;
4782
+ cookie?: never;
4783
+ };
4784
+ requestBody?: never;
4785
+ responses: {
4786
+ /** @description List of plans */
4787
+ 200: {
4788
+ headers: {
4789
+ [name: string]: unknown;
4790
+ };
4791
+ content: {
4792
+ "application/json": components["schemas"]["Plan"][];
4793
+ };
4794
+ };
4795
+ };
4796
+ };
4797
+ put?: never;
4798
+ /**
4799
+ * Create a new plan
4800
+ * @description Create a new subscription plan
4801
+ */
4802
+ post: {
4803
+ parameters: {
4804
+ query?: never;
4805
+ header?: never;
4806
+ path?: never;
4807
+ cookie?: never;
4808
+ };
4809
+ requestBody: {
4810
+ content: {
4811
+ "application/json": components["schemas"]["CreatePlanDto"];
4812
+ };
4813
+ };
4814
+ responses: {
4815
+ /** @description Plan created successfully */
4816
+ 201: {
4817
+ headers: {
4818
+ [name: string]: unknown;
4819
+ };
4820
+ content: {
4821
+ "application/json": components["schemas"]["Plan"];
4822
+ };
4823
+ };
4824
+ /** @description Plan with this code already exists */
4825
+ 409: {
4826
+ headers: {
4827
+ [name: string]: unknown;
4828
+ };
4829
+ content?: never;
4830
+ };
4831
+ };
4832
+ };
4833
+ delete?: never;
4834
+ options?: never;
4835
+ head?: never;
4836
+ patch?: never;
4837
+ trace?: never;
4838
+ };
4839
+ "/plans/{id}": {
4840
+ parameters: {
4841
+ query?: never;
4842
+ header?: never;
4843
+ path?: never;
4844
+ cookie?: never;
4845
+ };
4846
+ /**
4847
+ * Get a plan by ID
4848
+ * @description Retrieve details of a specific plan
4849
+ */
4850
+ get: {
4851
+ parameters: {
4852
+ query?: never;
4853
+ header?: never;
4854
+ path: {
4855
+ /** @description Plan ID */
4856
+ id: string;
4857
+ };
4858
+ cookie?: never;
4859
+ };
4860
+ requestBody?: never;
4861
+ responses: {
4862
+ /** @description Plan found */
4863
+ 200: {
4864
+ headers: {
4865
+ [name: string]: unknown;
4866
+ };
4867
+ content: {
4868
+ "application/json": components["schemas"]["Plan"];
4869
+ };
4870
+ };
4871
+ /** @description Plan not found */
4872
+ 404: {
4873
+ headers: {
4874
+ [name: string]: unknown;
4875
+ };
4876
+ content?: never;
4877
+ };
4878
+ };
4879
+ };
4880
+ put?: never;
4881
+ post?: never;
4882
+ /**
4883
+ * Delete a plan
4884
+ * @description Delete an existing plan
4885
+ */
4886
+ delete: {
4887
+ parameters: {
4888
+ query?: never;
4889
+ header?: never;
4890
+ path: {
4891
+ /** @description Plan ID */
4892
+ id: string;
4893
+ };
4894
+ cookie?: never;
4895
+ };
4896
+ requestBody?: never;
4897
+ responses: {
4898
+ /** @description Plan deleted successfully */
4899
+ 204: {
4900
+ headers: {
4901
+ [name: string]: unknown;
4902
+ };
4903
+ content?: never;
4904
+ };
4905
+ /** @description Plan not found */
4906
+ 404: {
4907
+ headers: {
4908
+ [name: string]: unknown;
4909
+ };
4910
+ content?: never;
4911
+ };
4912
+ };
4913
+ };
4914
+ options?: never;
4915
+ head?: never;
4916
+ /**
4917
+ * Update a plan
4918
+ * @description Update an existing plan
4919
+ */
4920
+ patch: {
4921
+ parameters: {
4922
+ query?: never;
4923
+ header?: never;
4924
+ path: {
4925
+ /** @description Plan ID */
4926
+ id: string;
4927
+ };
4928
+ cookie?: never;
4929
+ };
4930
+ requestBody: {
4931
+ content: {
4932
+ "application/json": components["schemas"]["UpdatePlanDto"];
4933
+ };
4934
+ };
4935
+ responses: {
4936
+ /** @description Plan updated successfully */
4937
+ 200: {
4938
+ headers: {
4939
+ [name: string]: unknown;
4940
+ };
4941
+ content: {
4942
+ "application/json": components["schemas"]["Plan"];
4943
+ };
4944
+ };
4945
+ /** @description Plan not found */
4946
+ 404: {
4947
+ headers: {
4948
+ [name: string]: unknown;
4949
+ };
4950
+ content?: never;
4951
+ };
4952
+ };
4953
+ };
4954
+ trace?: never;
4955
+ };
4956
+ "/quiz-attempt-answers": {
4957
+ parameters: {
4958
+ query?: never;
4959
+ header?: never;
4960
+ path?: never;
4961
+ cookie?: never;
4962
+ };
4963
+ /**
4964
+ * List all quiz attempt answers
4965
+ * @description Retrieve a list of all answers submitted in quiz attempts
4966
+ */
4967
+ get: {
4968
+ parameters: {
4969
+ query?: {
4970
+ /** @description Filter by quiz attempt ID */
4971
+ quizAttemptId?: string;
4972
+ /** @description Filter by quiz question answer ID */
4973
+ quizQuestionAnswerId?: string;
4974
+ /** @description Page number */
4975
+ page?: number;
4976
+ /** @description Items per page */
4977
+ limit?: number;
4978
+ };
4979
+ header?: never;
4980
+ path?: never;
4981
+ cookie?: never;
4982
+ };
4983
+ requestBody?: never;
4984
+ responses: {
4985
+ /** @description List of quiz attempt answers */
4986
+ 200: {
4987
+ headers: {
4988
+ [name: string]: unknown;
4989
+ };
4990
+ content: {
4991
+ "application/json": {
4992
+ /** @example success */
4993
+ status?: string;
4994
+ data?: components["schemas"]["QuizAttemptAnswer"][];
4995
+ meta?: components["schemas"]["PaginationMeta"];
4996
+ };
4997
+ };
4998
+ };
4999
+ 401: components["responses"]["Unauthorized"];
5000
+ 500: components["responses"]["ServerError"];
5001
+ };
5002
+ };
5003
+ put?: never;
5004
+ /**
5005
+ * Submit a quiz attempt answer
5006
+ * @description Record a user's answer for a quiz question
5007
+ */
5008
+ post: {
5009
+ parameters: {
5010
+ query?: never;
5011
+ header?: never;
5012
+ path?: never;
5013
+ cookie?: never;
5014
+ };
5015
+ requestBody: {
5016
+ content: {
5017
+ "application/json": components["schemas"]["CreateQuizAttemptAnswerDto"];
5018
+ };
5019
+ };
5020
+ responses: {
5021
+ /** @description Quiz attempt answer submitted successfully */
5022
+ 201: {
5023
+ headers: {
5024
+ [name: string]: unknown;
5025
+ };
5026
+ content: {
5027
+ "application/json": {
5028
+ /** @example success */
5029
+ status?: string;
5030
+ data?: components["schemas"]["QuizAttemptAnswer"];
5031
+ };
5032
+ };
5033
+ };
5034
+ 400: components["responses"]["BadRequest"];
5035
+ 401: components["responses"]["Unauthorized"];
5036
+ 500: components["responses"]["ServerError"];
5037
+ };
5038
+ };
5039
+ delete?: never;
5040
+ options?: never;
5041
+ head?: never;
5042
+ patch?: never;
5043
+ trace?: never;
5044
+ };
5045
+ "/quiz-attempt-answers/{id}": {
5046
+ parameters: {
5047
+ query?: never;
5048
+ header?: never;
5049
+ path?: never;
5050
+ cookie?: never;
5051
+ };
5052
+ /**
5053
+ * Get quiz attempt answer by ID
5054
+ * @description Retrieve detailed information about a specific quiz attempt answer
5055
+ */
5056
+ get: {
5057
+ parameters: {
5058
+ query?: never;
5059
+ header?: never;
5060
+ path: {
5061
+ /** @description Resource ID */
5062
+ id: components["parameters"]["id"];
5063
+ };
5064
+ cookie?: never;
5065
+ };
5066
+ requestBody?: never;
5067
+ responses: {
5068
+ /** @description Quiz attempt answer information */
5069
+ 200: {
5070
+ headers: {
5071
+ [name: string]: unknown;
5072
+ };
5073
+ content: {
5074
+ "application/json": {
5075
+ /** @example success */
5076
+ status?: string;
5077
+ data?: components["schemas"]["QuizAttemptAnswer"];
5078
+ };
5079
+ };
5080
+ };
5081
+ 400: components["responses"]["BadRequest"];
5082
+ 401: components["responses"]["Unauthorized"];
5083
+ 404: components["responses"]["NotFound"];
5084
+ 500: components["responses"]["ServerError"];
5085
+ };
5086
+ };
5087
+ put?: never;
5088
+ post?: never;
5089
+ /**
5090
+ * Delete quiz attempt answer
5091
+ * @description Remove a quiz attempt answer from the system
5092
+ */
5093
+ delete: {
5094
+ parameters: {
5095
+ query?: never;
5096
+ header?: never;
5097
+ path: {
5098
+ /** @description Resource ID */
5099
+ id: components["parameters"]["id"];
5100
+ };
5101
+ cookie?: never;
5102
+ };
5103
+ requestBody?: never;
5104
+ responses: {
5105
+ /** @description Quiz attempt answer deleted successfully */
5106
+ 204: {
5107
+ headers: {
5108
+ [name: string]: unknown;
5109
+ };
5110
+ content?: never;
5111
+ };
5112
+ 400: components["responses"]["BadRequest"];
5113
+ 401: components["responses"]["Unauthorized"];
5114
+ 404: components["responses"]["NotFound"];
5115
+ 500: components["responses"]["ServerError"];
5116
+ };
5117
+ };
5118
+ options?: never;
5119
+ head?: never;
5120
+ patch?: never;
5121
+ trace?: never;
5122
+ };
5123
+ "/quiz-attempts": {
5124
+ parameters: {
5125
+ query?: never;
5126
+ header?: never;
5127
+ path?: never;
5128
+ cookie?: never;
5129
+ };
5130
+ /**
5131
+ * List all quiz attempts
5132
+ * @description Retrieve a list of all quiz attempts with optional filtering
5133
+ */
5134
+ get: {
5135
+ parameters: {
5136
+ query?: {
5137
+ /** @description Filter by quiz ID */
5138
+ quizId?: string;
5139
+ /** @description Filter by user ID */
5140
+ userId?: string;
5141
+ /** @description Filter by passed status */
5142
+ passed?: boolean;
5143
+ /** @description Filter by completion status */
5144
+ completed?: boolean;
5145
+ /** @description Page number */
5146
+ page?: number;
5147
+ /** @description Items per page */
5148
+ limit?: number;
5149
+ };
5150
+ header?: never;
5151
+ path?: never;
5152
+ cookie?: never;
5153
+ };
5154
+ requestBody?: never;
5155
+ responses: {
5156
+ /** @description List of quiz attempts */
5157
+ 200: {
5158
+ headers: {
5159
+ [name: string]: unknown;
5160
+ };
5161
+ content: {
5162
+ "application/json": {
5163
+ /** @example success */
5164
+ status?: string;
5165
+ data?: components["schemas"]["QuizAttempt"][];
5166
+ meta?: components["schemas"]["PaginationMeta"];
5167
+ };
5168
+ };
5169
+ };
5170
+ 401: components["responses"]["Unauthorized"];
5171
+ 500: components["responses"]["ServerError"];
5172
+ };
5173
+ };
5174
+ put?: never;
5175
+ /**
5176
+ * Create a new quiz attempt
5177
+ * @description Start a new quiz attempt for a user
5178
+ */
5179
+ post: {
5180
+ parameters: {
5181
+ query?: never;
5182
+ header?: never;
5183
+ path?: never;
5184
+ cookie?: never;
5185
+ };
5186
+ requestBody: {
5187
+ content: {
5188
+ "application/json": components["schemas"]["CreateQuizAttemptDto"];
5189
+ };
5190
+ };
5191
+ responses: {
5192
+ /** @description Quiz attempt created successfully */
5193
+ 201: {
5194
+ headers: {
5195
+ [name: string]: unknown;
5196
+ };
5197
+ content: {
5198
+ "application/json": {
5199
+ /** @example success */
5200
+ status?: string;
5201
+ data?: components["schemas"]["QuizAttempt"];
5202
+ };
5203
+ };
5204
+ };
5205
+ 400: components["responses"]["BadRequest"];
5206
+ 401: components["responses"]["Unauthorized"];
5207
+ 500: components["responses"]["ServerError"];
5208
+ };
5209
+ };
5210
+ delete?: never;
5211
+ options?: never;
5212
+ head?: never;
5213
+ patch?: never;
5214
+ trace?: never;
5215
+ };
5216
+ "/quiz-attempts/{id}": {
5217
+ parameters: {
5218
+ query?: never;
5219
+ header?: never;
5220
+ path?: never;
5221
+ cookie?: never;
5222
+ };
5223
+ /**
5224
+ * Get quiz attempt by ID
5225
+ * @description Retrieve detailed information about a specific quiz attempt
5226
+ */
5227
+ get: {
5228
+ parameters: {
5229
+ query?: never;
5230
+ header?: never;
5231
+ path: {
5232
+ /** @description Resource ID */
5233
+ id: components["parameters"]["id"];
5234
+ };
5235
+ cookie?: never;
5236
+ };
5237
+ requestBody?: never;
5238
+ responses: {
5239
+ /** @description Quiz attempt information */
5240
+ 200: {
5241
+ headers: {
5242
+ [name: string]: unknown;
5243
+ };
5244
+ content: {
5245
+ "application/json": {
5246
+ /** @example success */
5247
+ status?: string;
5248
+ data?: components["schemas"]["QuizAttempt"];
5249
+ };
5250
+ };
5251
+ };
5252
+ 400: components["responses"]["BadRequest"];
5253
+ 401: components["responses"]["Unauthorized"];
5254
+ 404: components["responses"]["NotFound"];
5255
+ 500: components["responses"]["ServerError"];
5256
+ };
5257
+ };
5258
+ put?: never;
5259
+ post?: never;
5260
+ /**
5261
+ * Delete quiz attempt
5262
+ * @description Remove a quiz attempt from the system
5263
+ */
5264
+ delete: {
5265
+ parameters: {
5266
+ query?: never;
5267
+ header?: never;
5268
+ path: {
5269
+ /** @description Resource ID */
5270
+ id: components["parameters"]["id"];
5271
+ };
5272
+ cookie?: never;
5273
+ };
5274
+ requestBody?: never;
5275
+ responses: {
5276
+ /** @description Quiz attempt deleted successfully */
5277
+ 204: {
5278
+ headers: {
5279
+ [name: string]: unknown;
5280
+ };
5281
+ content?: never;
5282
+ };
5283
+ 400: components["responses"]["BadRequest"];
5284
+ 401: components["responses"]["Unauthorized"];
5285
+ 404: components["responses"]["NotFound"];
5286
+ 500: components["responses"]["ServerError"];
5287
+ };
5288
+ };
5289
+ options?: never;
5290
+ head?: never;
5291
+ /**
5292
+ * Update quiz attempt
5293
+ * @description Update quiz attempt information (score, completion, etc.)
5294
+ */
5295
+ patch: {
5296
+ parameters: {
5297
+ query?: never;
5298
+ header?: never;
5299
+ path: {
5300
+ /** @description Resource ID */
5301
+ id: components["parameters"]["id"];
5302
+ };
5303
+ cookie?: never;
5304
+ };
5305
+ requestBody: {
5306
+ content: {
5307
+ "application/json": components["schemas"]["UpdateQuizAttemptDto"];
5308
+ };
5309
+ };
5310
+ responses: {
5311
+ /** @description Quiz attempt updated successfully */
5312
+ 200: {
5313
+ headers: {
5314
+ [name: string]: unknown;
5315
+ };
5316
+ content: {
5317
+ "application/json": {
5318
+ /** @example success */
5319
+ status?: string;
5320
+ data?: components["schemas"]["QuizAttempt"];
5321
+ };
5322
+ };
5323
+ };
5324
+ 400: components["responses"]["BadRequest"];
5325
+ 401: components["responses"]["Unauthorized"];
5326
+ 404: components["responses"]["NotFound"];
5327
+ 500: components["responses"]["ServerError"];
5328
+ };
5329
+ };
5330
+ trace?: never;
5331
+ };
5332
+ "/quiz-question-answers": {
5333
+ parameters: {
5334
+ query?: never;
5335
+ header?: never;
5336
+ path?: never;
5337
+ cookie?: never;
5338
+ };
5339
+ /**
5340
+ * List all quiz question answers
5341
+ * @description Retrieve a list of all answers for quiz questions
5342
+ */
5343
+ get: {
5344
+ parameters: {
5345
+ query?: {
5346
+ /** @description Filter by question ID */
5347
+ questionId?: string;
5348
+ /** @description Filter by correct answers */
5349
+ isCorrect?: boolean;
5350
+ /** @description Search in answer text */
5351
+ search?: string;
5352
+ /** @description Page number */
5353
+ page?: number;
5354
+ /** @description Items per page */
5355
+ limit?: number;
5356
+ };
5357
+ header?: never;
5358
+ path?: never;
5359
+ cookie?: never;
5360
+ };
5361
+ requestBody?: never;
5362
+ responses: {
5363
+ /** @description List of quiz question answers */
5364
+ 200: {
5365
+ headers: {
5366
+ [name: string]: unknown;
5367
+ };
5368
+ content: {
5369
+ "application/json": {
5370
+ /** @example success */
5371
+ status?: string;
5372
+ data?: components["schemas"]["QuizQuestionAnswer"][];
5373
+ meta?: components["schemas"]["PaginationMeta"];
5374
+ };
5375
+ };
5376
+ };
5377
+ 401: components["responses"]["Unauthorized"];
5378
+ 500: components["responses"]["ServerError"];
5379
+ };
5380
+ };
5381
+ put?: never;
5382
+ /**
5383
+ * Create a new quiz question answer
5384
+ * @description Create a new answer option for a quiz question
5385
+ */
5386
+ post: {
5387
+ parameters: {
5388
+ query?: never;
5389
+ header?: never;
5390
+ path?: never;
5391
+ cookie?: never;
5392
+ };
5393
+ requestBody: {
5394
+ content: {
5395
+ "application/json": components["schemas"]["CreateQuizQuestionAnswerDto"];
5396
+ };
5397
+ };
5398
+ responses: {
5399
+ /** @description Quiz question answer created successfully */
5400
+ 201: {
5401
+ headers: {
5402
+ [name: string]: unknown;
5403
+ };
5404
+ content: {
5405
+ "application/json": {
5406
+ /** @example success */
5407
+ status?: string;
5408
+ data?: components["schemas"]["QuizQuestionAnswer"];
5409
+ };
5410
+ };
5411
+ };
5412
+ 400: components["responses"]["BadRequest"];
5413
+ 401: components["responses"]["Unauthorized"];
5414
+ 500: components["responses"]["ServerError"];
5415
+ };
5416
+ };
5417
+ delete?: never;
5418
+ options?: never;
5419
+ head?: never;
5420
+ patch?: never;
5421
+ trace?: never;
5422
+ };
5423
+ "/quiz-question-answers/{id}": {
5424
+ parameters: {
5425
+ query?: never;
5426
+ header?: never;
5427
+ path?: never;
5428
+ cookie?: never;
5429
+ };
5430
+ /**
5431
+ * Get quiz question answer by ID
5432
+ * @description Retrieve detailed information about a specific quiz question answer
5433
+ */
5434
+ get: {
5435
+ parameters: {
5436
+ query?: never;
5437
+ header?: never;
5438
+ path: {
5439
+ /** @description Resource ID */
5440
+ id: components["parameters"]["id"];
5441
+ };
5442
+ cookie?: never;
5443
+ };
5444
+ requestBody?: never;
5445
+ responses: {
5446
+ /** @description Quiz question answer information */
5447
+ 200: {
5448
+ headers: {
5449
+ [name: string]: unknown;
5450
+ };
5451
+ content: {
5452
+ "application/json": {
5453
+ /** @example success */
5454
+ status?: string;
5455
+ data?: components["schemas"]["QuizQuestionAnswer"];
5456
+ };
5457
+ };
5458
+ };
5459
+ 400: components["responses"]["BadRequest"];
5460
+ 401: components["responses"]["Unauthorized"];
5461
+ 404: components["responses"]["NotFound"];
5462
+ 500: components["responses"]["ServerError"];
5463
+ };
5464
+ };
5465
+ put?: never;
5466
+ post?: never;
5467
+ /**
5468
+ * Delete quiz question answer
5469
+ * @description Remove a quiz question answer from the system
5470
+ */
5471
+ delete: {
5472
+ parameters: {
5473
+ query?: never;
5474
+ header?: never;
5475
+ path: {
5476
+ /** @description Resource ID */
5477
+ id: components["parameters"]["id"];
5478
+ };
5479
+ cookie?: never;
5480
+ };
5481
+ requestBody?: never;
5482
+ responses: {
5483
+ /** @description Quiz question answer deleted successfully */
5484
+ 204: {
5485
+ headers: {
5486
+ [name: string]: unknown;
5487
+ };
5488
+ content?: never;
5489
+ };
5490
+ 400: components["responses"]["BadRequest"];
5491
+ 401: components["responses"]["Unauthorized"];
5492
+ 404: components["responses"]["NotFound"];
5493
+ 500: components["responses"]["ServerError"];
5494
+ };
5495
+ };
5496
+ options?: never;
5497
+ head?: never;
5498
+ /**
5499
+ * Update quiz question answer
5500
+ * @description Update quiz question answer information
5501
+ */
5502
+ patch: {
5503
+ parameters: {
5504
+ query?: never;
5505
+ header?: never;
5506
+ path: {
5507
+ /** @description Resource ID */
5508
+ id: components["parameters"]["id"];
5509
+ };
5510
+ cookie?: never;
5511
+ };
5512
+ requestBody: {
5513
+ content: {
5514
+ "application/json": components["schemas"]["UpdateQuizQuestionAnswerDto"];
5515
+ };
5516
+ };
5517
+ responses: {
5518
+ /** @description Quiz question answer updated successfully */
5519
+ 200: {
5520
+ headers: {
5521
+ [name: string]: unknown;
5522
+ };
5523
+ content: {
5524
+ "application/json": {
5525
+ /** @example success */
5526
+ status?: string;
5527
+ data?: components["schemas"]["QuizQuestionAnswer"];
5528
+ };
5529
+ };
5530
+ };
5531
+ 400: components["responses"]["BadRequest"];
5532
+ 401: components["responses"]["Unauthorized"];
5533
+ 404: components["responses"]["NotFound"];
5534
+ 500: components["responses"]["ServerError"];
5535
+ };
5536
+ };
5537
+ trace?: never;
5538
+ };
5539
+ "/quiz-questions": {
5540
+ parameters: {
5541
+ query?: never;
5542
+ header?: never;
5543
+ path?: never;
5544
+ cookie?: never;
5545
+ };
5546
+ /**
5547
+ * List all quiz questions
5548
+ * @description Retrieve a list of all quiz questions with optional filtering
5549
+ */
5550
+ get: {
5551
+ parameters: {
5552
+ query?: {
5553
+ /** @description Filter by quiz ID */
5554
+ quizId?: string;
5555
+ /** @description Filter by question type */
5556
+ type?: "multiple_choice" | "true_false" | "open";
5557
+ /** @description Search in question text */
5558
+ search?: string;
5559
+ /** @description Page number */
5560
+ page?: number;
5561
+ /** @description Items per page */
5562
+ limit?: number;
5563
+ };
5564
+ header?: never;
5565
+ path?: never;
5566
+ cookie?: never;
5567
+ };
5568
+ requestBody?: never;
5569
+ responses: {
5570
+ /** @description List of quiz questions */
5571
+ 200: {
5572
+ headers: {
5573
+ [name: string]: unknown;
5574
+ };
5575
+ content: {
5576
+ "application/json": {
5577
+ /** @example success */
5578
+ status?: string;
5579
+ data?: components["schemas"]["QuizQuestion"][];
5580
+ meta?: components["schemas"]["PaginationMeta"];
5581
+ };
5582
+ };
5583
+ };
5584
+ 401: components["responses"]["Unauthorized"];
5585
+ 500: components["responses"]["ServerError"];
5586
+ };
5587
+ };
5588
+ put?: never;
5589
+ /**
5590
+ * Create a new quiz question
5591
+ * @description Create a new question for a quiz
5592
+ */
5593
+ post: {
5594
+ parameters: {
5595
+ query?: never;
5596
+ header?: never;
5597
+ path?: never;
5598
+ cookie?: never;
5599
+ };
5600
+ requestBody: {
5601
+ content: {
5602
+ "application/json": components["schemas"]["CreateQuizQuestionDto"];
5603
+ };
5604
+ };
5605
+ responses: {
5606
+ /** @description Quiz question created successfully */
5607
+ 201: {
5608
+ headers: {
5609
+ [name: string]: unknown;
5610
+ };
5611
+ content: {
5612
+ "application/json": {
5613
+ /** @example success */
5614
+ status?: string;
5615
+ data?: components["schemas"]["QuizQuestion"];
5616
+ };
5617
+ };
5618
+ };
5619
+ 400: components["responses"]["BadRequest"];
5620
+ 401: components["responses"]["Unauthorized"];
5621
+ 409: components["responses"]["Conflict"];
5622
+ 500: components["responses"]["ServerError"];
5623
+ };
5624
+ };
5625
+ delete?: never;
5626
+ options?: never;
5627
+ head?: never;
5628
+ patch?: never;
5629
+ trace?: never;
5630
+ };
5631
+ "/quiz-questions/{id}": {
5632
+ parameters: {
5633
+ query?: never;
5634
+ header?: never;
5635
+ path?: never;
5636
+ cookie?: never;
5637
+ };
5638
+ /**
5639
+ * Get quiz question by ID
5640
+ * @description Retrieve detailed information about a specific quiz question
5641
+ */
5642
+ get: {
5643
+ parameters: {
5644
+ query?: never;
5645
+ header?: never;
5646
+ path: {
5647
+ /** @description Resource ID */
5648
+ id: components["parameters"]["id"];
5649
+ };
5650
+ cookie?: never;
5651
+ };
5652
+ requestBody?: never;
5653
+ responses: {
5654
+ /** @description Quiz question information */
5655
+ 200: {
5656
+ headers: {
5657
+ [name: string]: unknown;
5658
+ };
5659
+ content: {
5660
+ "application/json": {
5661
+ /** @example success */
5662
+ status?: string;
5663
+ data?: components["schemas"]["QuizQuestion"];
5664
+ };
5665
+ };
5666
+ };
5667
+ 400: components["responses"]["BadRequest"];
5668
+ 401: components["responses"]["Unauthorized"];
5669
+ 404: components["responses"]["NotFound"];
5670
+ 500: components["responses"]["ServerError"];
5671
+ };
5672
+ };
5673
+ put?: never;
5674
+ post?: never;
5675
+ /**
5676
+ * Delete quiz question
5677
+ * @description Remove a quiz question from the system
5678
+ */
5679
+ delete: {
5680
+ parameters: {
5681
+ query?: never;
5682
+ header?: never;
5683
+ path: {
5684
+ /** @description Resource ID */
5685
+ id: components["parameters"]["id"];
5686
+ };
5687
+ cookie?: never;
5688
+ };
5689
+ requestBody?: never;
5690
+ responses: {
5691
+ /** @description Quiz question deleted successfully */
5692
+ 204: {
5693
+ headers: {
5694
+ [name: string]: unknown;
5695
+ };
5696
+ content?: never;
5697
+ };
5698
+ 400: components["responses"]["BadRequest"];
5699
+ 401: components["responses"]["Unauthorized"];
5700
+ 404: components["responses"]["NotFound"];
5701
+ 500: components["responses"]["ServerError"];
5702
+ };
5703
+ };
5704
+ options?: never;
5705
+ head?: never;
5706
+ /**
5707
+ * Update quiz question
5708
+ * @description Update quiz question information
5709
+ */
5710
+ patch: {
5711
+ parameters: {
5712
+ query?: never;
5713
+ header?: never;
5714
+ path: {
5715
+ /** @description Resource ID */
5716
+ id: components["parameters"]["id"];
5717
+ };
5718
+ cookie?: never;
5719
+ };
5720
+ requestBody: {
5721
+ content: {
5722
+ "application/json": components["schemas"]["UpdateQuizQuestionDto"];
5723
+ };
5724
+ };
5725
+ responses: {
5726
+ /** @description Quiz question updated successfully */
5727
+ 200: {
5728
+ headers: {
5729
+ [name: string]: unknown;
5730
+ };
5731
+ content: {
5732
+ "application/json": {
5733
+ /** @example success */
5734
+ status?: string;
5735
+ data?: components["schemas"]["QuizQuestion"];
5736
+ };
5737
+ };
5738
+ };
5739
+ 400: components["responses"]["BadRequest"];
5740
+ 401: components["responses"]["Unauthorized"];
5741
+ 404: components["responses"]["NotFound"];
5742
+ 409: components["responses"]["Conflict"];
5743
+ 500: components["responses"]["ServerError"];
5744
+ };
5745
+ };
5746
+ trace?: never;
5747
+ };
5748
+ "/quiz": {
5749
+ parameters: {
5750
+ query?: never;
5751
+ header?: never;
5752
+ path?: never;
5753
+ cookie?: never;
5754
+ };
5755
+ /**
5756
+ * List all quizzes
5757
+ * @description Retrieve a list of all quizzes with optional filtering
5758
+ */
5759
+ get: {
5760
+ parameters: {
5761
+ query?: {
5762
+ /** @description Filter by quiz title */
5763
+ title?: string;
5764
+ /** @description Filter by course ID */
5765
+ courseId?: string;
5766
+ /** @description Filter by active status */
5767
+ isActive?: boolean;
5768
+ /** @description Filter by creator user ID */
5769
+ createdBy?: string;
5770
+ /** @description Search in title */
3673
5771
  search?: string;
3674
5772
  /** @description Page number */
3675
5773
  page?: number;
@@ -3682,7 +5780,7 @@ export interface paths {
3682
5780
  };
3683
5781
  requestBody?: never;
3684
5782
  responses: {
3685
- /** @description List of organizations */
5783
+ /** @description List of quizzes */
3686
5784
  200: {
3687
5785
  headers: {
3688
5786
  [name: string]: unknown;
@@ -3691,13 +5789,8 @@ export interface paths {
3691
5789
  "application/json": {
3692
5790
  /** @example success */
3693
5791
  status?: string;
3694
- data?: components["schemas"]["Organization"][];
3695
- meta?: {
3696
- total?: number;
3697
- page?: number;
3698
- limit?: number;
3699
- totalPages?: number;
3700
- };
5792
+ data?: components["schemas"]["Quiz"][];
5793
+ meta?: components["schemas"]["PaginationMeta"];
3701
5794
  };
3702
5795
  };
3703
5796
  };
@@ -3707,8 +5800,8 @@ export interface paths {
3707
5800
  };
3708
5801
  put?: never;
3709
5802
  /**
3710
- * Create a new organization
3711
- * @description Create a new organization in the hierarchy
5803
+ * Create a new quiz
5804
+ * @description Create a new quiz with questions
3712
5805
  */
3713
5806
  post: {
3714
5807
  parameters: {
@@ -3719,11 +5812,11 @@ export interface paths {
3719
5812
  };
3720
5813
  requestBody: {
3721
5814
  content: {
3722
- "application/json": components["schemas"]["CreateOrganizationDto"];
5815
+ "application/json": components["schemas"]["CreateQuizDto"];
3723
5816
  };
3724
5817
  };
3725
5818
  responses: {
3726
- /** @description Organization created successfully */
5819
+ /** @description Quiz created successfully */
3727
5820
  201: {
3728
5821
  headers: {
3729
5822
  [name: string]: unknown;
@@ -3732,7 +5825,7 @@ export interface paths {
3732
5825
  "application/json": {
3733
5826
  /** @example success */
3734
5827
  status?: string;
3735
- data?: components["schemas"]["Organization"];
5828
+ data?: components["schemas"]["Quiz"];
3736
5829
  };
3737
5830
  };
3738
5831
  };
@@ -3747,7 +5840,7 @@ export interface paths {
3747
5840
  patch?: never;
3748
5841
  trace?: never;
3749
5842
  };
3750
- "/organizations/{id}": {
5843
+ "/quiz/{id}": {
3751
5844
  parameters: {
3752
5845
  query?: never;
3753
5846
  header?: never;
@@ -3755,8 +5848,8 @@ export interface paths {
3755
5848
  cookie?: never;
3756
5849
  };
3757
5850
  /**
3758
- * Get organization by ID
3759
- * @description Retrieve detailed information about a specific organization
5851
+ * Get quiz by ID
5852
+ * @description Retrieve detailed information about a specific quiz
3760
5853
  */
3761
5854
  get: {
3762
5855
  parameters: {
@@ -3770,7 +5863,7 @@ export interface paths {
3770
5863
  };
3771
5864
  requestBody?: never;
3772
5865
  responses: {
3773
- /** @description Organization information */
5866
+ /** @description Quiz information */
3774
5867
  200: {
3775
5868
  headers: {
3776
5869
  [name: string]: unknown;
@@ -3779,7 +5872,7 @@ export interface paths {
3779
5872
  "application/json": {
3780
5873
  /** @example success */
3781
5874
  status?: string;
3782
- data?: components["schemas"]["Organization"];
5875
+ data?: components["schemas"]["Quiz"];
3783
5876
  };
3784
5877
  };
3785
5878
  };
@@ -3792,8 +5885,8 @@ export interface paths {
3792
5885
  put?: never;
3793
5886
  post?: never;
3794
5887
  /**
3795
- * Delete organization
3796
- * @description Remove an organization from the system. Cannot delete organizations with children.
5888
+ * Delete quiz
5889
+ * @description Remove a quiz from the system
3797
5890
  */
3798
5891
  delete: {
3799
5892
  parameters: {
@@ -3807,7 +5900,7 @@ export interface paths {
3807
5900
  };
3808
5901
  requestBody?: never;
3809
5902
  responses: {
3810
- /** @description Organization deleted successfully */
5903
+ /** @description Quiz deleted successfully */
3811
5904
  204: {
3812
5905
  headers: {
3813
5906
  [name: string]: unknown;
@@ -3823,8 +5916,8 @@ export interface paths {
3823
5916
  options?: never;
3824
5917
  head?: never;
3825
5918
  /**
3826
- * Update organization
3827
- * @description Update organization information
5919
+ * Update quiz
5920
+ * @description Update quiz information
3828
5921
  */
3829
5922
  patch: {
3830
5923
  parameters: {
@@ -3838,11 +5931,11 @@ export interface paths {
3838
5931
  };
3839
5932
  requestBody: {
3840
5933
  content: {
3841
- "application/json": components["schemas"]["UpdateOrganizationDto"];
5934
+ "application/json": components["schemas"]["UpdateQuizDto"];
3842
5935
  };
3843
5936
  };
3844
5937
  responses: {
3845
- /** @description Organization updated successfully */
5938
+ /** @description Quiz updated successfully */
3846
5939
  200: {
3847
5940
  headers: {
3848
5941
  [name: string]: unknown;
@@ -3851,7 +5944,7 @@ export interface paths {
3851
5944
  "application/json": {
3852
5945
  /** @example success */
3853
5946
  status?: string;
3854
- data?: components["schemas"]["Organization"];
5947
+ data?: components["schemas"]["Quiz"];
3855
5948
  };
3856
5949
  };
3857
5950
  };
@@ -4891,11 +6984,217 @@ export interface paths {
4891
6984
  };
4892
6985
  requestBody: {
4893
6986
  content: {
4894
- "application/json": components["schemas"]["CreateSerieDto"];
6987
+ "application/json": components["schemas"]["CreateSerieDto"];
6988
+ };
6989
+ };
6990
+ responses: {
6991
+ /** @description Serie created successfully */
6992
+ 201: {
6993
+ headers: {
6994
+ [name: string]: unknown;
6995
+ };
6996
+ content: {
6997
+ "application/json": {
6998
+ /** @example success */
6999
+ status?: string;
7000
+ data?: components["schemas"]["Serie"];
7001
+ /** @example Serie created successfully */
7002
+ message?: string;
7003
+ };
7004
+ };
7005
+ };
7006
+ 400: components["responses"]["BadRequest"];
7007
+ 401: components["responses"]["Unauthorized"];
7008
+ 500: components["responses"]["ServerError"];
7009
+ };
7010
+ };
7011
+ delete?: never;
7012
+ options?: never;
7013
+ head?: never;
7014
+ patch?: never;
7015
+ trace?: never;
7016
+ };
7017
+ "/series/{id}": {
7018
+ parameters: {
7019
+ query?: never;
7020
+ header?: never;
7021
+ path?: never;
7022
+ cookie?: never;
7023
+ };
7024
+ /**
7025
+ * Get serie by ID
7026
+ * @description Retrieve detailed information about a specific serie/grade
7027
+ */
7028
+ get: {
7029
+ parameters: {
7030
+ query?: never;
7031
+ header?: never;
7032
+ path: {
7033
+ /** @description Resource ID */
7034
+ id: components["parameters"]["id"];
7035
+ };
7036
+ cookie?: never;
7037
+ };
7038
+ requestBody?: never;
7039
+ responses: {
7040
+ /** @description Serie information */
7041
+ 200: {
7042
+ headers: {
7043
+ [name: string]: unknown;
7044
+ };
7045
+ content: {
7046
+ "application/json": {
7047
+ /** @example success */
7048
+ status?: string;
7049
+ data?: components["schemas"]["Serie"];
7050
+ };
7051
+ };
7052
+ };
7053
+ 400: components["responses"]["BadRequest"];
7054
+ 401: components["responses"]["Unauthorized"];
7055
+ 404: components["responses"]["NotFound"];
7056
+ 500: components["responses"]["ServerError"];
7057
+ };
7058
+ };
7059
+ put?: never;
7060
+ post?: never;
7061
+ /**
7062
+ * Delete serie
7063
+ * @description Remove a serie from the system
7064
+ */
7065
+ delete: {
7066
+ parameters: {
7067
+ query?: never;
7068
+ header?: never;
7069
+ path: {
7070
+ /** @description Resource ID */
7071
+ id: components["parameters"]["id"];
7072
+ };
7073
+ cookie?: never;
7074
+ };
7075
+ requestBody?: never;
7076
+ responses: {
7077
+ /** @description Serie deleted successfully */
7078
+ 200: {
7079
+ headers: {
7080
+ [name: string]: unknown;
7081
+ };
7082
+ content: {
7083
+ "application/json": {
7084
+ /** @example success */
7085
+ status?: string;
7086
+ /** @example Serie deleted successfully */
7087
+ message?: string;
7088
+ };
7089
+ };
7090
+ };
7091
+ 400: components["responses"]["BadRequest"];
7092
+ 401: components["responses"]["Unauthorized"];
7093
+ 404: components["responses"]["NotFound"];
7094
+ 500: components["responses"]["ServerError"];
7095
+ };
7096
+ };
7097
+ options?: never;
7098
+ head?: never;
7099
+ /**
7100
+ * Update serie
7101
+ * @description Update serie information
7102
+ */
7103
+ patch: {
7104
+ parameters: {
7105
+ query?: never;
7106
+ header?: never;
7107
+ path: {
7108
+ /** @description Resource ID */
7109
+ id: components["parameters"]["id"];
7110
+ };
7111
+ cookie?: never;
7112
+ };
7113
+ requestBody: {
7114
+ content: {
7115
+ "application/json": components["schemas"]["UpdateSerieDto"];
7116
+ };
7117
+ };
7118
+ responses: {
7119
+ /** @description Serie updated successfully */
7120
+ 200: {
7121
+ headers: {
7122
+ [name: string]: unknown;
7123
+ };
7124
+ content: {
7125
+ "application/json": {
7126
+ /** @example success */
7127
+ status?: string;
7128
+ data?: components["schemas"]["Serie"];
7129
+ /** @example Serie updated successfully */
7130
+ message?: string;
7131
+ };
7132
+ };
7133
+ };
7134
+ 400: components["responses"]["BadRequest"];
7135
+ 401: components["responses"]["Unauthorized"];
7136
+ 404: components["responses"]["NotFound"];
7137
+ 500: components["responses"]["ServerError"];
7138
+ };
7139
+ };
7140
+ trace?: never;
7141
+ };
7142
+ "/shifts": {
7143
+ parameters: {
7144
+ query?: never;
7145
+ header?: never;
7146
+ path?: never;
7147
+ cookie?: never;
7148
+ };
7149
+ /**
7150
+ * List all shifts
7151
+ * @description Retrieve a list of all institution shifts (manhã, tarde, noite)
7152
+ */
7153
+ get: {
7154
+ parameters: {
7155
+ query?: never;
7156
+ header?: never;
7157
+ path?: never;
7158
+ cookie?: never;
7159
+ };
7160
+ requestBody?: never;
7161
+ responses: {
7162
+ /** @description List of shifts */
7163
+ 200: {
7164
+ headers: {
7165
+ [name: string]: unknown;
7166
+ };
7167
+ content: {
7168
+ "application/json": {
7169
+ /** @example success */
7170
+ status?: string;
7171
+ data?: components["schemas"]["Shift"][];
7172
+ };
7173
+ };
7174
+ };
7175
+ 401: components["responses"]["Unauthorized"];
7176
+ 500: components["responses"]["ServerError"];
7177
+ };
7178
+ };
7179
+ put?: never;
7180
+ /**
7181
+ * Create a new shift
7182
+ * @description Create a new institution shift
7183
+ */
7184
+ post: {
7185
+ parameters: {
7186
+ query?: never;
7187
+ header?: never;
7188
+ path?: never;
7189
+ cookie?: never;
7190
+ };
7191
+ requestBody: {
7192
+ content: {
7193
+ "application/json": components["schemas"]["CreateShiftDto"];
4895
7194
  };
4896
7195
  };
4897
7196
  responses: {
4898
- /** @description Serie created successfully */
7197
+ /** @description Shift created successfully */
4899
7198
  201: {
4900
7199
  headers: {
4901
7200
  [name: string]: unknown;
@@ -4904,8 +7203,8 @@ export interface paths {
4904
7203
  "application/json": {
4905
7204
  /** @example success */
4906
7205
  status?: string;
4907
- data?: components["schemas"]["Serie"];
4908
- /** @example Serie created successfully */
7206
+ data?: components["schemas"]["Shift"];
7207
+ /** @example Shift created successfully */
4909
7208
  message?: string;
4910
7209
  };
4911
7210
  };
@@ -4921,7 +7220,7 @@ export interface paths {
4921
7220
  patch?: never;
4922
7221
  trace?: never;
4923
7222
  };
4924
- "/series/{id}": {
7223
+ "/shifts/{id}": {
4925
7224
  parameters: {
4926
7225
  query?: never;
4927
7226
  header?: never;
@@ -4929,8 +7228,8 @@ export interface paths {
4929
7228
  cookie?: never;
4930
7229
  };
4931
7230
  /**
4932
- * Get serie by ID
4933
- * @description Retrieve detailed information about a specific serie/grade
7231
+ * Get shift by ID
7232
+ * @description Retrieve detailed information about a specific shift
4934
7233
  */
4935
7234
  get: {
4936
7235
  parameters: {
@@ -4944,7 +7243,7 @@ export interface paths {
4944
7243
  };
4945
7244
  requestBody?: never;
4946
7245
  responses: {
4947
- /** @description Serie information */
7246
+ /** @description Shift information */
4948
7247
  200: {
4949
7248
  headers: {
4950
7249
  [name: string]: unknown;
@@ -4953,7 +7252,7 @@ export interface paths {
4953
7252
  "application/json": {
4954
7253
  /** @example success */
4955
7254
  status?: string;
4956
- data?: components["schemas"]["Serie"];
7255
+ data?: components["schemas"]["Shift"];
4957
7256
  };
4958
7257
  };
4959
7258
  };
@@ -4966,8 +7265,8 @@ export interface paths {
4966
7265
  put?: never;
4967
7266
  post?: never;
4968
7267
  /**
4969
- * Delete serie
4970
- * @description Remove a serie from the system
7268
+ * Delete shift
7269
+ * @description Remove a shift from the system
4971
7270
  */
4972
7271
  delete: {
4973
7272
  parameters: {
@@ -4981,7 +7280,7 @@ export interface paths {
4981
7280
  };
4982
7281
  requestBody?: never;
4983
7282
  responses: {
4984
- /** @description Serie deleted successfully */
7283
+ /** @description Shift deleted successfully */
4985
7284
  200: {
4986
7285
  headers: {
4987
7286
  [name: string]: unknown;
@@ -4990,7 +7289,7 @@ export interface paths {
4990
7289
  "application/json": {
4991
7290
  /** @example success */
4992
7291
  status?: string;
4993
- /** @example Serie deleted successfully */
7292
+ /** @example Shift deleted successfully */
4994
7293
  message?: string;
4995
7294
  };
4996
7295
  };
@@ -5004,8 +7303,8 @@ export interface paths {
5004
7303
  options?: never;
5005
7304
  head?: never;
5006
7305
  /**
5007
- * Update serie
5008
- * @description Update serie information
7306
+ * Update shift
7307
+ * @description Update shift information
5009
7308
  */
5010
7309
  patch: {
5011
7310
  parameters: {
@@ -5019,11 +7318,11 @@ export interface paths {
5019
7318
  };
5020
7319
  requestBody: {
5021
7320
  content: {
5022
- "application/json": components["schemas"]["UpdateSerieDto"];
7321
+ "application/json": components["schemas"]["UpdateShiftDto"];
5023
7322
  };
5024
7323
  };
5025
7324
  responses: {
5026
- /** @description Serie updated successfully */
7325
+ /** @description Shift updated successfully */
5027
7326
  200: {
5028
7327
  headers: {
5029
7328
  [name: string]: unknown;
@@ -5032,8 +7331,8 @@ export interface paths {
5032
7331
  "application/json": {
5033
7332
  /** @example success */
5034
7333
  status?: string;
5035
- data?: components["schemas"]["Serie"];
5036
- /** @example Serie updated successfully */
7334
+ data?: components["schemas"]["Shift"];
7335
+ /** @example Shift updated successfully */
5037
7336
  message?: string;
5038
7337
  };
5039
7338
  };
@@ -5046,7 +7345,7 @@ export interface paths {
5046
7345
  };
5047
7346
  trace?: never;
5048
7347
  };
5049
- "/shifts": {
7348
+ "/subscriptions": {
5050
7349
  parameters: {
5051
7350
  query?: never;
5052
7351
  header?: never;
@@ -5054,39 +7353,40 @@ export interface paths {
5054
7353
  cookie?: never;
5055
7354
  };
5056
7355
  /**
5057
- * List all shifts
5058
- * @description Retrieve a list of all institution shifts (manhã, tarde, noite)
7356
+ * Get all subscriptions
7357
+ * @description Retrieve a list of all subscriptions with optional filters
5059
7358
  */
5060
7359
  get: {
5061
7360
  parameters: {
5062
- query?: never;
7361
+ query?: {
7362
+ /** @description Filter by plan ID */
7363
+ planId?: string;
7364
+ /** @description Filter by institution ID */
7365
+ institutionId?: string;
7366
+ /** @description Filter by group ID */
7367
+ groupId?: string;
7368
+ };
5063
7369
  header?: never;
5064
7370
  path?: never;
5065
7371
  cookie?: never;
5066
7372
  };
5067
7373
  requestBody?: never;
5068
7374
  responses: {
5069
- /** @description List of shifts */
7375
+ /** @description List of subscriptions */
5070
7376
  200: {
5071
7377
  headers: {
5072
7378
  [name: string]: unknown;
5073
7379
  };
5074
7380
  content: {
5075
- "application/json": {
5076
- /** @example success */
5077
- status?: string;
5078
- data?: components["schemas"]["Shift"][];
5079
- };
7381
+ "application/json": components["schemas"]["Subscription"][];
5080
7382
  };
5081
7383
  };
5082
- 401: components["responses"]["Unauthorized"];
5083
- 500: components["responses"]["ServerError"];
5084
7384
  };
5085
7385
  };
5086
7386
  put?: never;
5087
7387
  /**
5088
- * Create a new shift
5089
- * @description Create a new institution shift
7388
+ * Create a new subscription
7389
+ * @description Create a subscription linking a plan to an institution or group
5090
7390
  */
5091
7391
  post: {
5092
7392
  parameters: {
@@ -5097,28 +7397,26 @@ export interface paths {
5097
7397
  };
5098
7398
  requestBody: {
5099
7399
  content: {
5100
- "application/json": components["schemas"]["CreateShiftDto"];
7400
+ "application/json": components["schemas"]["CreateSubscriptionDto"];
5101
7401
  };
5102
7402
  };
5103
7403
  responses: {
5104
- /** @description Shift created successfully */
7404
+ /** @description Subscription created successfully */
5105
7405
  201: {
5106
7406
  headers: {
5107
7407
  [name: string]: unknown;
5108
7408
  };
5109
7409
  content: {
5110
- "application/json": {
5111
- /** @example success */
5112
- status?: string;
5113
- data?: components["schemas"]["Shift"];
5114
- /** @example Shift created successfully */
5115
- message?: string;
5116
- };
7410
+ "application/json": components["schemas"]["Subscription"];
5117
7411
  };
5118
7412
  };
5119
- 400: components["responses"]["BadRequest"];
5120
- 401: components["responses"]["Unauthorized"];
5121
- 500: components["responses"]["ServerError"];
7413
+ /** @description Invalid request (missing required fields) */
7414
+ 400: {
7415
+ headers: {
7416
+ [name: string]: unknown;
7417
+ };
7418
+ content?: never;
7419
+ };
5122
7420
  };
5123
7421
  };
5124
7422
  delete?: never;
@@ -5127,7 +7425,7 @@ export interface paths {
5127
7425
  patch?: never;
5128
7426
  trace?: never;
5129
7427
  };
5130
- "/shifts/{id}": {
7428
+ "/subscriptions/{id}": {
5131
7429
  parameters: {
5132
7430
  query?: never;
5133
7431
  header?: never;
@@ -5135,119 +7433,111 @@ export interface paths {
5135
7433
  cookie?: never;
5136
7434
  };
5137
7435
  /**
5138
- * Get shift by ID
5139
- * @description Retrieve detailed information about a specific shift
7436
+ * Get a subscription by ID
7437
+ * @description Retrieve details of a specific subscription
5140
7438
  */
5141
7439
  get: {
5142
7440
  parameters: {
5143
7441
  query?: never;
5144
7442
  header?: never;
5145
7443
  path: {
5146
- /** @description Resource ID */
5147
- id: components["parameters"]["id"];
7444
+ /** @description Subscription ID */
7445
+ id: string;
5148
7446
  };
5149
7447
  cookie?: never;
5150
7448
  };
5151
7449
  requestBody?: never;
5152
7450
  responses: {
5153
- /** @description Shift information */
7451
+ /** @description Subscription found */
5154
7452
  200: {
5155
7453
  headers: {
5156
7454
  [name: string]: unknown;
5157
7455
  };
5158
7456
  content: {
5159
- "application/json": {
5160
- /** @example success */
5161
- status?: string;
5162
- data?: components["schemas"]["Shift"];
5163
- };
7457
+ "application/json": components["schemas"]["Subscription"];
5164
7458
  };
5165
7459
  };
5166
- 400: components["responses"]["BadRequest"];
5167
- 401: components["responses"]["Unauthorized"];
5168
- 404: components["responses"]["NotFound"];
5169
- 500: components["responses"]["ServerError"];
7460
+ /** @description Subscription not found */
7461
+ 404: {
7462
+ headers: {
7463
+ [name: string]: unknown;
7464
+ };
7465
+ content?: never;
7466
+ };
5170
7467
  };
5171
7468
  };
5172
7469
  put?: never;
5173
7470
  post?: never;
5174
7471
  /**
5175
- * Delete shift
5176
- * @description Remove a shift from the system
7472
+ * Delete a subscription
7473
+ * @description Delete an existing subscription
5177
7474
  */
5178
7475
  delete: {
5179
7476
  parameters: {
5180
7477
  query?: never;
5181
7478
  header?: never;
5182
7479
  path: {
5183
- /** @description Resource ID */
5184
- id: components["parameters"]["id"];
7480
+ /** @description Subscription ID */
7481
+ id: string;
5185
7482
  };
5186
7483
  cookie?: never;
5187
7484
  };
5188
7485
  requestBody?: never;
5189
7486
  responses: {
5190
- /** @description Shift deleted successfully */
5191
- 200: {
7487
+ /** @description Subscription deleted successfully */
7488
+ 204: {
5192
7489
  headers: {
5193
7490
  [name: string]: unknown;
5194
7491
  };
5195
- content: {
5196
- "application/json": {
5197
- /** @example success */
5198
- status?: string;
5199
- /** @example Shift deleted successfully */
5200
- message?: string;
5201
- };
7492
+ content?: never;
7493
+ };
7494
+ /** @description Subscription not found */
7495
+ 404: {
7496
+ headers: {
7497
+ [name: string]: unknown;
5202
7498
  };
7499
+ content?: never;
5203
7500
  };
5204
- 400: components["responses"]["BadRequest"];
5205
- 401: components["responses"]["Unauthorized"];
5206
- 404: components["responses"]["NotFound"];
5207
- 500: components["responses"]["ServerError"];
5208
7501
  };
5209
7502
  };
5210
7503
  options?: never;
5211
7504
  head?: never;
5212
7505
  /**
5213
- * Update shift
5214
- * @description Update shift information
7506
+ * Update a subscription
7507
+ * @description Update an existing subscription
5215
7508
  */
5216
7509
  patch: {
5217
7510
  parameters: {
5218
7511
  query?: never;
5219
7512
  header?: never;
5220
7513
  path: {
5221
- /** @description Resource ID */
5222
- id: components["parameters"]["id"];
7514
+ /** @description Subscription ID */
7515
+ id: string;
5223
7516
  };
5224
7517
  cookie?: never;
5225
7518
  };
5226
7519
  requestBody: {
5227
7520
  content: {
5228
- "application/json": components["schemas"]["UpdateShiftDto"];
7521
+ "application/json": components["schemas"]["UpdateSubscriptionDto"];
5229
7522
  };
5230
7523
  };
5231
7524
  responses: {
5232
- /** @description Shift updated successfully */
7525
+ /** @description Subscription updated successfully */
5233
7526
  200: {
5234
7527
  headers: {
5235
7528
  [name: string]: unknown;
5236
7529
  };
5237
7530
  content: {
5238
- "application/json": {
5239
- /** @example success */
5240
- status?: string;
5241
- data?: components["schemas"]["Shift"];
5242
- /** @example Shift updated successfully */
5243
- message?: string;
5244
- };
7531
+ "application/json": components["schemas"]["Subscription"];
5245
7532
  };
5246
7533
  };
5247
- 400: components["responses"]["BadRequest"];
5248
- 401: components["responses"]["Unauthorized"];
5249
- 404: components["responses"]["NotFound"];
5250
- 500: components["responses"]["ServerError"];
7534
+ /** @description Subscription not found */
7535
+ 404: {
7536
+ headers: {
7537
+ [name: string]: unknown;
7538
+ };
7539
+ content?: never;
7540
+ };
5251
7541
  };
5252
7542
  };
5253
7543
  trace?: never;
@@ -5445,11 +7735,22 @@ export interface paths {
5445
7735
  };
5446
7736
  put?: never;
5447
7737
  /**
5448
- * Create a new user
7738
+ * Create a new user (authenticated)
5449
7739
  * @description Creates a new user following this flow:
5450
7740
  * 1. Creates the user in Keycloak with username, email, password, and profile information
5451
7741
  * 2. Retrieves the generated Keycloak user ID
5452
- * 3. Creates the user in MongoDB using the Keycloak ID as the primary key
7742
+ * 3. Creates the user in the database using the Keycloak ID as the primary key
7743
+ * 4. Associates the user with a group and institution using ONE of two methods:
7744
+ *
7745
+ * **Method 1: Using seatCodeId (recommended)**
7746
+ * - Provide seatCodeId to automatically derive groupId and institutionId from the seat code
7747
+ * - The seat code must be valid, not reserved, and not already in use
7748
+ * - Creates user_group and institution_registration records automatically
7749
+ *
7750
+ * **Method 2: Using groupId + institutionId**
7751
+ * - Provide groupId and institutionId manually
7752
+ * - System will find an available seat_code for the institution + group combination
7753
+ * - Creates user_group and institution_registration records
5453
7754
  *
5454
7755
  * Note: The user ID is automatically generated by Keycloak and should NOT be provided in the request.
5455
7756
  */
@@ -5480,7 +7781,7 @@ export interface paths {
5480
7781
  /** @example +5511999999999 */
5481
7782
  phone?: string;
5482
7783
  /** @example 12345678901 */
5483
- document?: number;
7784
+ document: string;
5484
7785
  /**
5485
7786
  * @example male
5486
7787
  * @enum {string}
@@ -5491,11 +7792,35 @@ export interface paths {
5491
7792
  * @example 1990-01-15T00:00:00.000Z
5492
7793
  */
5493
7794
  birthdate?: string;
7795
+ /**
7796
+ * Format: uuid
7797
+ * @description Optional seat code ID to register the user. When provided, groupId and institutionId
7798
+ * are not required as they will be derived from the seat code's associated seat.
7799
+ * The seat code must be valid, not reserved, and not already in use by another user.
7800
+ * @example 550e8400-e29b-41d4-a716-446655440002
7801
+ */
7802
+ seatCodeId?: string;
7803
+ /**
7804
+ * Format: uuid
7805
+ * @description Optional group ID to associate the user with a group (creates user_group record).
7806
+ * Not required if seatCodeId is provided.
7807
+ * @example 550e8400-e29b-41d4-a716-446655440000
7808
+ */
7809
+ groupId?: string;
7810
+ /**
7811
+ * Format: uuid
7812
+ * @description Optional institution ID to register the user in an institution.
7813
+ * Requires groupId to be provided. Will automatically find and assign
7814
+ * an available seat_code for the institution + group combination.
7815
+ * Not required if seatCodeId is provided.
7816
+ * @example 550e8400-e29b-41d4-a716-446655440001
7817
+ */
7818
+ institutionId?: string;
5494
7819
  };
5495
7820
  };
5496
7821
  };
5497
7822
  responses: {
5498
- /** @description User created successfully in both Keycloak and MongoDB */
7823
+ /** @description User created successfully in both Keycloak and database */
5499
7824
  201: {
5500
7825
  headers: {
5501
7826
  [name: string]: unknown;
@@ -5508,9 +7833,39 @@ export interface paths {
5508
7833
  };
5509
7834
  };
5510
7835
  };
5511
- 400: components["responses"]["BadRequest"];
7836
+ /**
7837
+ * @description Bad request. Possible causes:
7838
+ * - Missing required fields
7839
+ * - institutionId provided without groupId (when not using seatCodeId)
7840
+ * - No seat found for institution + group combination
7841
+ * - No available seat codes for the institution and group
7842
+ * - Seat code not found or already in use
7843
+ * - Seat code is reserved and cannot be used
7844
+ */
7845
+ 400: {
7846
+ headers: {
7847
+ [name: string]: unknown;
7848
+ };
7849
+ content: {
7850
+ "application/json": components["schemas"]["Error"];
7851
+ };
7852
+ };
5512
7853
  401: components["responses"]["Unauthorized"];
5513
- /** @description User already exists (either in Keycloak or MongoDB) */
7854
+ /**
7855
+ * @description Not found. Possible causes:
7856
+ * - Group not found
7857
+ * - Institution not found
7858
+ * - Seat not found for the seat code
7859
+ */
7860
+ 404: {
7861
+ headers: {
7862
+ [name: string]: unknown;
7863
+ };
7864
+ content: {
7865
+ "application/json": components["schemas"]["Error"];
7866
+ };
7867
+ };
7868
+ /** @description User already exists (either in Keycloak or database) */
5514
7869
  409: {
5515
7870
  headers: {
5516
7871
  [name: string]: unknown;
@@ -5782,12 +8137,126 @@ export interface paths {
5782
8137
  /** @description Resource ID */
5783
8138
  id: components["parameters"]["id"];
5784
8139
  };
5785
- cookie?: never;
8140
+ cookie?: never;
8141
+ };
8142
+ requestBody?: never;
8143
+ responses: {
8144
+ /** @description List of user's institutions */
8145
+ 200: {
8146
+ headers: {
8147
+ [name: string]: unknown;
8148
+ };
8149
+ content: {
8150
+ "application/json": {
8151
+ /** @example success */
8152
+ status?: string;
8153
+ data?: components["schemas"]["Institution"][];
8154
+ };
8155
+ };
8156
+ };
8157
+ 400: components["responses"]["BadRequest"];
8158
+ 401: components["responses"]["Unauthorized"];
8159
+ 404: components["responses"]["NotFound"];
8160
+ 500: components["responses"]["ServerError"];
8161
+ };
8162
+ };
8163
+ put?: never;
8164
+ post?: never;
8165
+ delete?: never;
8166
+ options?: never;
8167
+ head?: never;
8168
+ patch?: never;
8169
+ trace?: never;
8170
+ };
8171
+ "/users/register": {
8172
+ parameters: {
8173
+ query?: never;
8174
+ header?: never;
8175
+ path?: never;
8176
+ cookie?: never;
8177
+ };
8178
+ get?: never;
8179
+ put?: never;
8180
+ /**
8181
+ * Public user registration
8182
+ * @description Creates a new user without requiring authentication (public endpoint).
8183
+ * This endpoint has an additional validation: it only allows registration
8184
+ * for groups that are NOT of type "other".
8185
+ *
8186
+ * Allowed group types: student, teacher, school-director
8187
+ * Blocked group type: other
8188
+ *
8189
+ * The group type is validated based on:
8190
+ * - The groupId provided directly, OR
8191
+ * - The group associated with the seatCodeId (derived from seat)
8192
+ *
8193
+ * This endpoint follows the same user creation flow as POST /users,
8194
+ * including Keycloak user creation and optional institution/group associations.
8195
+ */
8196
+ post: {
8197
+ parameters: {
8198
+ query?: never;
8199
+ header?: never;
8200
+ path?: never;
8201
+ cookie?: never;
8202
+ };
8203
+ requestBody: {
8204
+ content: {
8205
+ "application/json": {
8206
+ /** @example John */
8207
+ firstName: string;
8208
+ /** @example Doe */
8209
+ lastName: string;
8210
+ /**
8211
+ * Format: email
8212
+ * @example john.doe@example.com
8213
+ */
8214
+ email: string;
8215
+ /**
8216
+ * @description Password for the user's Keycloak account
8217
+ * @example SecurePassword123!
8218
+ */
8219
+ password: string;
8220
+ /** @example +5511999999999 */
8221
+ phone?: string;
8222
+ /** @example 12345678901 */
8223
+ document: string;
8224
+ /**
8225
+ * @example male
8226
+ * @enum {string}
8227
+ */
8228
+ gender?: "male" | "female" | "other";
8229
+ /**
8230
+ * Format: date-time
8231
+ * @example 1990-01-15T00:00:00.000Z
8232
+ */
8233
+ birthdate?: string;
8234
+ /**
8235
+ * Format: uuid
8236
+ * @description Seat code ID to register the user. When provided, groupId and institutionId
8237
+ * are derived from the seat code. Required if groupId is not provided.
8238
+ * @example 550e8400-e29b-41d4-a716-446655440002
8239
+ */
8240
+ seatCodeId?: string;
8241
+ /**
8242
+ * Format: uuid
8243
+ * @description Group ID to associate the user. Required if seatCodeId is not provided.
8244
+ * The group must NOT be of type "other".
8245
+ * @example 550e8400-e29b-41d4-a716-446655440000
8246
+ */
8247
+ groupId?: string;
8248
+ /**
8249
+ * Format: uuid
8250
+ * @description Institution ID to register the user. Requires groupId.
8251
+ * @example 550e8400-e29b-41d4-a716-446655440001
8252
+ */
8253
+ institutionId?: string;
8254
+ };
8255
+ };
5786
8256
  };
5787
- requestBody?: never;
5788
8257
  responses: {
5789
- /** @description List of user's institutions */
5790
- 200: {
8258
+ /** @description User created successfully */
8259
+ 201: {
5791
8260
  headers: {
5792
8261
  [name: string]: unknown;
5793
8262
  };
@@ -5795,18 +8264,51 @@ export interface paths {
5795
8264
  "application/json": {
5796
8265
  /** @example success */
5797
8266
  status?: string;
5798
- data?: components["schemas"]["Institution"][];
8267
+ data?: components["schemas"]["User"];
5799
8268
  };
5800
8269
  };
5801
8270
  };
5802
- 400: components["responses"]["BadRequest"];
5803
- 401: components["responses"]["Unauthorized"];
5804
- 404: components["responses"]["NotFound"];
8271
+ /**
8272
+ * @description Bad request. Possible causes:
8273
+ * - Missing required fields
8274
+ * - Neither groupId nor seatCodeId provided
8275
+ * - Group type is "other" (not allowed for public registration)
8276
+ * - Seat code not found or already in use
8277
+ * - Seat code is reserved
8278
+ */
8279
+ 400: {
8280
+ headers: {
8281
+ [name: string]: unknown;
8282
+ };
8283
+ content: {
8284
+ "application/json": components["schemas"]["Error"];
8285
+ };
8286
+ };
8287
+ /**
8288
+ * @description Not found. Possible causes:
8289
+ * - Group not found
8290
+ * - Seat not found for the seat code
8291
+ */
8292
+ 404: {
8293
+ headers: {
8294
+ [name: string]: unknown;
8295
+ };
8296
+ content: {
8297
+ "application/json": components["schemas"]["Error"];
8298
+ };
8299
+ };
8300
+ /** @description User already exists (either in Keycloak or database) */
8301
+ 409: {
8302
+ headers: {
8303
+ [name: string]: unknown;
8304
+ };
8305
+ content: {
8306
+ "application/json": components["schemas"]["Error"];
8307
+ };
8308
+ };
5805
8309
  500: components["responses"]["ServerError"];
5806
8310
  };
5807
8311
  };
5808
- put?: never;
5809
- post?: never;
5810
8312
  delete?: never;
5811
8313
  options?: never;
5812
8314
  head?: never;
@@ -5898,28 +8400,28 @@ export interface components {
5898
8400
  * Format: uuid
5899
8401
  * @description Keycloak User ID
5900
8402
  */
5901
- id?: string;
8403
+ id: string;
5902
8404
  /** @example John */
5903
- firstName?: string;
8405
+ firstName: string;
5904
8406
  /** @example Doe */
5905
- lastName?: string;
8407
+ lastName: string;
5906
8408
  /**
5907
8409
  * Format: email
5908
8410
  * @example john.doe@example.com
5909
8411
  */
5910
- email?: string;
8412
+ email: string;
5911
8413
  /** @example +5511999999999 */
5912
8414
  phone?: string | null;
5913
8415
  /** @example 12345678901 */
5914
- document?: number | null;
8416
+ document: string;
5915
8417
  /** @enum {string|null} */
5916
8418
  gender?: "male" | "female" | "other" | null;
5917
8419
  /** Format: date-time */
5918
8420
  birthdate?: string | null;
5919
8421
  /** Format: date-time */
5920
- createdAt?: string;
8422
+ createdAt: string;
5921
8423
  /** Format: date-time */
5922
- updatedAt?: string;
8424
+ updatedAt: string;
5923
8425
  /** @description User's group associations */
5924
8426
  userGroups?: components["schemas"]["UserGroup"][];
5925
8427
  /** @description User's guardian associations */
@@ -5965,24 +8467,24 @@ export interface components {
5965
8467
  * Format: uuid
5966
8468
  * @description Keycloak Group ID
5967
8469
  */
5968
- id?: string;
8470
+ id: string;
5969
8471
  /** @example students */
5970
- name?: string;
8472
+ name: string;
5971
8473
  /**
5972
8474
  * @description If true, group is automatically associated when creating institutions
5973
8475
  * @example false
5974
8476
  */
5975
- isDefault?: boolean;
8477
+ isDefault: boolean;
5976
8478
  /**
5977
8479
  * @description Type of the group
5978
8480
  * @example student
5979
8481
  * @enum {string}
5980
8482
  */
5981
- type?: "student" | "teacher" | "school-director" | "other";
8483
+ type: "student" | "teacher" | "school-director" | "other";
5982
8484
  /** Format: date-time */
5983
- createdAt?: string;
8485
+ createdAt: string;
5984
8486
  /** Format: date-time */
5985
- updatedAt?: string;
8487
+ updatedAt: string;
5986
8488
  };
5987
8489
  CreateGroupDto: {
5988
8490
  /** @example students */
@@ -6020,19 +8522,19 @@ export interface components {
6020
8522
  };
6021
8523
  UserGroup: {
6022
8524
  /** Format: uuid */
6023
- id?: string;
8525
+ id: string;
6024
8526
  /** Format: uuid */
6025
- userId?: string;
8527
+ userId: string;
6026
8528
  /** Format: uuid */
6027
- groupId?: string;
8529
+ groupId: string;
6028
8530
  /** Format: date-time */
6029
- assignedAt?: string;
8531
+ assignedAt: string;
6030
8532
  /** Format: uuid */
6031
8533
  assignedBy?: string | null;
6032
8534
  /** Format: date-time */
6033
- createdAt?: string;
8535
+ createdAt: string;
6034
8536
  /** Format: date-time */
6035
- updatedAt?: string;
8537
+ updatedAt: string;
6036
8538
  group?: components["schemas"]["Group"];
6037
8539
  };
6038
8540
  UserGuardian: {
@@ -6086,6 +8588,8 @@ export interface components {
6086
8588
  * @example 5
6087
8589
  */
6088
8590
  certificatesCount?: number;
8591
+ /** @description User's group associations */
8592
+ userGroups?: components["schemas"]["UserGroup"][];
6089
8593
  /** @description User's guardian associations */
6090
8594
  userGuardians?: {
6091
8595
  /** Format: uuid */
@@ -6113,6 +8617,11 @@ export interface components {
6113
8617
  * @example true
6114
8618
  */
6115
8619
  isActive?: boolean;
8620
+ /**
8621
+ * Format: date-time
8622
+ * @description Date when the user was registered in the institution
8623
+ */
8624
+ createdAt?: string;
6116
8625
  /** @description Classroom assignment details */
6117
8626
  institutionClassroom?: {
6118
8627
  /** Format: uuid */
@@ -6153,19 +8662,28 @@ export interface components {
6153
8662
  meta?: components["schemas"]["PaginationMeta"];
6154
8663
  };
6155
8664
  InstitutionRegistration: {
6156
- /** Format: uuid */
8665
+ /**
8666
+ * Format: uuid
8667
+ * @description Unique identifier
8668
+ */
6157
8669
  id?: string;
6158
- /** Format: uuid */
8670
+ /**
8671
+ * Format: uuid
8672
+ * @description User ID
8673
+ */
6159
8674
  userId?: string;
6160
- /** Format: uuid */
8675
+ /**
8676
+ * Format: uuid
8677
+ * @description Institution ID
8678
+ */
6161
8679
  institutionId?: string;
6162
8680
  /**
6163
8681
  * Format: uuid
6164
- * @description ID of the institution classroom assignment
8682
+ * @description Classroom ID
6165
8683
  */
6166
8684
  institutionClassroomId?: string | null;
6167
8685
  /**
6168
- * @description Indicates if the user is active in the institution
8686
+ * @description Whether the registration is active
6169
8687
  * @example true
6170
8688
  */
6171
8689
  isActive?: boolean;
@@ -6177,6 +8695,13 @@ export interface components {
6177
8695
  institution?: components["schemas"]["Institution"];
6178
8696
  /** @description Classroom assignment with complete details (classroom, shift, serie) */
6179
8697
  institutionClassroom?: components["schemas"]["InstitutionClassroom"];
8698
+ /**
8699
+ * Format: uuid
8700
+ * @description Seat Code ID
8701
+ */
8702
+ seatCodeId?: string;
8703
+ user?: components["schemas"]["User"];
8704
+ seatCode?: components["schemas"]["SeatCode"];
6180
8705
  };
6181
8706
  InstitutionClassroom: {
6182
8707
  /** Format: uuid */
@@ -6207,9 +8732,9 @@ export interface components {
6207
8732
  * Format: uuid
6208
8733
  * @description Keycloak Role ID
6209
8734
  */
6210
- id?: string;
8735
+ id: string;
6211
8736
  /** @example admin */
6212
- name?: string;
8737
+ name: string;
6213
8738
  /**
6214
8739
  * @description Role description
6215
8740
  * @example Administrator role with full permissions
@@ -6223,9 +8748,9 @@ export interface components {
6223
8748
  /** @description Application details if this is a client role */
6224
8749
  application?: components["schemas"]["Application"];
6225
8750
  /** Format: date-time */
6226
- createdAt?: string;
8751
+ createdAt: string;
6227
8752
  /** Format: date-time */
6228
- updatedAt?: string;
8753
+ updatedAt: string;
6229
8754
  };
6230
8755
  CreateRoleDto: {
6231
8756
  /** @example admin */
@@ -6253,20 +8778,20 @@ export interface components {
6253
8778
  };
6254
8779
  Institution: {
6255
8780
  /** Format: uuid */
6256
- id?: string;
8781
+ id: string;
6257
8782
  /** @example Academe Institution */
6258
- name?: string;
8783
+ name: string;
6259
8784
  /** @example SCH001 */
6260
- code?: string;
8785
+ code: string;
6261
8786
  /** @example 12.345.678/0001-90 */
6262
- document?: string;
8787
+ document: string;
6263
8788
  /** Format: email */
6264
- email?: string;
8789
+ email: string;
6265
8790
  phone?: string | null;
6266
8791
  /** @example 500 */
6267
- maxStudents?: number;
8792
+ maxStudents: number;
6268
8793
  /** @example true */
6269
- isActive?: boolean;
8794
+ isActive: boolean;
6270
8795
  /** Format: uri */
6271
8796
  logoUrl?: string | null;
6272
8797
  /** Format: uri */
@@ -6276,9 +8801,9 @@ export interface components {
6276
8801
  /** Format: uuid */
6277
8802
  institutionRewardId?: string | null;
6278
8803
  /** Format: date-time */
6279
- createdAt?: string;
8804
+ createdAt: string;
6280
8805
  /** Format: date-time */
6281
- updatedAt?: string;
8806
+ updatedAt: string;
6282
8807
  };
6283
8808
  Organization: {
6284
8809
  /** Format: uuid */
@@ -6363,36 +8888,40 @@ export interface components {
6363
8888
  };
6364
8889
  Certificate: {
6365
8890
  /** Format: uuid */
6366
- id?: string;
6367
- /** Format: uuid */
6368
- userId?: string;
6369
- /** Format: uuid */
6370
- courseId?: string | null;
8891
+ id: string;
6371
8892
  /** 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;
8893
+ userId: string;
8894
+ /**
8895
+ * Format: uuid
8896
+ * @description Quiz attempt that generated the certificate
8897
+ */
8898
+ quizAttemptId?: string | null;
8899
+ /**
8900
+ * Format: uuid
8901
+ * @description Certificate template used
8902
+ */
8903
+ certificateTemplateId: string;
8904
+ /**
8905
+ * @description Unique certificate number
8906
+ * @example CERT-2024-000001
8907
+ */
8908
+ certificateNumber: string;
8909
+ /**
8910
+ * Format: uri
8911
+ * @description URL of the generated certificate PDF
8912
+ * @example https://example.com/certificates/cert-123.pdf
8913
+ */
8914
+ url?: string | null;
6392
8915
  /** Format: date-time */
6393
- createdAt?: string;
8916
+ createdAt: string;
6394
8917
  /** Format: date-time */
6395
- updatedAt?: string;
8918
+ updatedAt: string;
8919
+ /** @description User who received the certificate */
8920
+ user?: components["schemas"]["User"];
8921
+ /** @description Quiz attempt details (if applicable) */
8922
+ quizAttempt?: components["schemas"]["QuizAttempt"];
8923
+ /** @description Template used for the certificate */
8924
+ certificateTemplate?: components["schemas"]["CertificateTemplate"];
6396
8925
  };
6397
8926
  Guardian: {
6398
8927
  /** Format: uuid */
@@ -6487,6 +9016,16 @@ export interface components {
6487
9016
  name: string;
6488
9017
  /** @description Application description */
6489
9018
  description?: string | null;
9019
+ /**
9020
+ * @description JSON object with application settings and rules
9021
+ * @example {
9022
+ * "mike": {
9023
+ * "enabled": true,
9024
+ * "daily_limit": 60
9025
+ * }
9026
+ * }
9027
+ */
9028
+ settings?: Record<string, never>;
6490
9029
  /** Format: date-time */
6491
9030
  createdAt?: string;
6492
9031
  /** Format: date-time */
@@ -6499,12 +9038,24 @@ export interface components {
6499
9038
  name: string;
6500
9039
  /** @description Application description */
6501
9040
  description?: string;
9041
+ /**
9042
+ * @description JSON object with application settings
9043
+ * @example {
9044
+ * "mike": {
9045
+ * "enabled": true,
9046
+ * "daily_limit": 60
9047
+ * }
9048
+ * }
9049
+ */
9050
+ settings?: Record<string, never>;
6502
9051
  };
6503
9052
  UpdateApplicationDto: {
6504
9053
  /** @description Application name */
6505
9054
  name?: string;
6506
9055
  /** @description Application description */
6507
9056
  description?: string;
9057
+ /** @description JSON object with application settings */
9058
+ settings?: Record<string, never>;
6508
9059
  };
6509
9060
  AuthenticatedUser: {
6510
9061
  /** @description Keycloak user ID */
@@ -6553,7 +9104,150 @@ export interface components {
6553
9104
  /** @description Whether the classroom is active in the institution */
6554
9105
  isActive?: boolean;
6555
9106
  };
6556
- InstitutionGroup: {
9107
+ CreateInstitutionRegistrationDto: {
9108
+ /**
9109
+ * Format: uuid
9110
+ * @description User ID to register in the institution
9111
+ */
9112
+ userId: string;
9113
+ /** @description The seat code to redeem for registration */
9114
+ seatCode: string;
9115
+ /**
9116
+ * Format: uuid
9117
+ * @description Optional classroom ID to assign the user to
9118
+ */
9119
+ institutionClassroomId?: string | null;
9120
+ /**
9121
+ * @description Whether the registration is active
9122
+ * @default true
9123
+ */
9124
+ isActive: boolean;
9125
+ };
9126
+ UpdateInstitutionRegistrationDto: {
9127
+ /**
9128
+ * Format: uuid
9129
+ * @description Classroom ID to assign the user to (null to remove)
9130
+ */
9131
+ institutionClassroomId?: string | null;
9132
+ /** @description Whether the registration is active */
9133
+ isActive?: boolean;
9134
+ };
9135
+ AssignClassroomDto: {
9136
+ /**
9137
+ * Format: uuid
9138
+ * @description Classroom ID to assign the user to (null to remove assignment)
9139
+ */
9140
+ institutionClassroomId?: string | null;
9141
+ };
9142
+ /** @description Seat with institution data included */
9143
+ SeatWithInstitution: {
9144
+ /** Format: uuid */
9145
+ id?: string;
9146
+ name?: string;
9147
+ description?: string;
9148
+ /** Format: uuid */
9149
+ institutionId?: string;
9150
+ /** Format: uuid */
9151
+ groupId?: string;
9152
+ availableQuantity?: number;
9153
+ /** Format: date-time */
9154
+ createdAt?: string;
9155
+ /** Format: date-time */
9156
+ updatedAt?: string;
9157
+ group?: components["schemas"]["Group"];
9158
+ institution?: components["schemas"]["Institution"];
9159
+ };
9160
+ /** @description Seat code with seat and institution data included */
9161
+ SeatCodeWithInstitution: {
9162
+ /**
9163
+ * Format: uuid
9164
+ * @description Unique identifier
9165
+ */
9166
+ id?: string;
9167
+ /** @description Unique seat code */
9168
+ code?: string;
9169
+ /**
9170
+ * Format: uuid
9171
+ * @description Seat ID this code belongs to
9172
+ */
9173
+ seatId?: string;
9174
+ /** @description Whether the code is reserved (used) */
9175
+ isReserved?: boolean;
9176
+ /** Format: date-time */
9177
+ createdAt?: string;
9178
+ seat?: components["schemas"]["SeatWithInstitution"];
9179
+ };
9180
+ /** @description User associated with the registration */
9181
+ SeatCodeRegistrationUser: {
9182
+ /** Format: uuid */
9183
+ id?: string;
9184
+ /** @description User's first name */
9185
+ firstName?: string;
9186
+ /** @description User's last name */
9187
+ lastName?: string;
9188
+ /** Format: email */
9189
+ email?: string;
9190
+ } | null;
9191
+ /** @description Institution registration associated with this seat code (if reserved) */
9192
+ SeatCodeRegistration: {
9193
+ /** Format: uuid */
9194
+ id?: string;
9195
+ /** Format: uuid */
9196
+ userId?: string;
9197
+ /** Format: uuid */
9198
+ institutionId?: string;
9199
+ isActive?: boolean;
9200
+ /** Format: date-time */
9201
+ createdAt?: string;
9202
+ user?: components["schemas"]["SeatCodeRegistrationUser"];
9203
+ } | null;
9204
+ SeatCode: {
9205
+ /**
9206
+ * Format: uuid
9207
+ * @description Unique identifier
9208
+ */
9209
+ id?: string;
9210
+ /** @description Unique seat code */
9211
+ code?: string;
9212
+ /**
9213
+ * Format: uuid
9214
+ * @description Seat ID this code belongs to
9215
+ */
9216
+ seatId?: string;
9217
+ /** @description Whether the code is reserved (used) */
9218
+ isReserved?: boolean;
9219
+ /** Format: date-time */
9220
+ createdAt?: string;
9221
+ seat?: components["schemas"]["Seats"];
9222
+ institutionRegistration?: components["schemas"]["SeatCodeRegistration"];
9223
+ };
9224
+ CreateSeatCodesDto: {
9225
+ /**
9226
+ * Format: uuid
9227
+ * @description Seat ID to generate codes for
9228
+ */
9229
+ seatId: string;
9230
+ /** @description Number of codes to generate */
9231
+ quantity: number;
9232
+ };
9233
+ SendCodeDto: {
9234
+ /** @description Phone number to send the license link via WhatsApp */
9235
+ phone: string;
9236
+ /** @description Name of the recipient (optional) */
9237
+ name?: string;
9238
+ /** @description Seat code string to send (optional). If not provided, will find an available code from the seatId */
9239
+ code?: string;
9240
+ /**
9241
+ * Format: uuid
9242
+ * @description Seat ID to find an available code from (optional). Required if code is not provided
9243
+ */
9244
+ seatId?: string;
9245
+ };
9246
+ UpdateSeatCodeDto: {
9247
+ /** @description Whether the code is reserved */
9248
+ isReserved?: boolean;
9249
+ };
9250
+ Seats: {
6557
9251
  /**
6558
9252
  * Format: uuid
6559
9253
  * @description Unique identifier
@@ -6563,7 +9257,7 @@ export interface components {
6563
9257
  * Format: uuid
6564
9258
  * @description Institution ID
6565
9259
  */
6566
- institutionId?: string;
9260
+ institutionId?: string | null;
6567
9261
  /**
6568
9262
  * Format: uuid
6569
9263
  * @description Group ID
@@ -6571,13 +9265,15 @@ export interface components {
6571
9265
  groupId?: string;
6572
9266
  /** @description Available quantity for this group in the institution */
6573
9267
  availableQuantity?: number;
9268
+ /** @description Number of users currently assigned to this group in the institution */
9269
+ usedQuantity?: number;
6574
9270
  /** Format: date-time */
6575
9271
  createdAt?: string;
6576
9272
  /** Format: date-time */
6577
9273
  updatedAt?: string;
6578
9274
  group?: components["schemas"]["Group"];
6579
9275
  };
6580
- CreateInstitutionGroupDto: {
9276
+ CreateSeatsDto: {
6581
9277
  /**
6582
9278
  * Format: uuid
6583
9279
  * @description Group ID to associate with the institution
@@ -6589,42 +9285,79 @@ export interface components {
6589
9285
  */
6590
9286
  availableQuantity: number;
6591
9287
  };
6592
- UpdateInstitutionGroupDto: {
9288
+ UpdateSeatsDto: {
6593
9289
  /** @description New available quantity for this group */
6594
9290
  availableQuantity: number;
6595
9291
  };
6596
- CreateInstitutionRegistrationDto: {
9292
+ Plan: {
6597
9293
  /**
6598
9294
  * Format: uuid
6599
- * @description User ID to register in the institution
9295
+ * @description Unique identifier for the plan
6600
9296
  */
6601
- userId: string;
9297
+ id: string;
6602
9298
  /**
6603
- * Format: uuid
6604
- * @description Optional classroom ID to assign the user to
9299
+ * @description Unique code for the plan (e.g., gold_plan, free_tier)
9300
+ * @example gold_plan
6605
9301
  */
6606
- institutionClassroomId?: string | null;
9302
+ code: string;
6607
9303
  /**
6608
- * @description Whether the registration is active
9304
+ * @description Display name of the plan
9305
+ * @example Plano Gold
9306
+ */
9307
+ name: string;
9308
+ /**
9309
+ * @description JSON object with plan settings and configurations
9310
+ * @example {
9311
+ * "maxUsers": 100,
9312
+ * "features": [
9313
+ * "analytics",
9314
+ * "support"
9315
+ * ]
9316
+ * }
9317
+ */
9318
+ settings: Record<string, never>;
9319
+ /**
9320
+ * @description Whether the plan is currently active
6609
9321
  * @default true
6610
9322
  */
6611
9323
  isActive: boolean;
6612
- };
6613
- UpdateInstitutionRegistrationDto: {
6614
9324
  /**
6615
- * Format: uuid
6616
- * @description Classroom ID to assign the user to (null to remove)
9325
+ * Format: date-time
9326
+ * @description Timestamp when the plan was created
6617
9327
  */
6618
- institutionClassroomId?: string | null;
6619
- /** @description Whether the registration is active */
6620
- isActive?: boolean;
9328
+ createdAt?: string;
6621
9329
  };
6622
- AssignClassroomDto: {
9330
+ CreatePlanDto: {
6623
9331
  /**
6624
- * Format: uuid
6625
- * @description Classroom ID to assign the user to (null to remove assignment)
9332
+ * @description Unique code for the plan
9333
+ * @example gold_plan
6626
9334
  */
6627
- institutionClassroomId?: string | null;
9335
+ code: string;
9336
+ /**
9337
+ * @description Display name of the plan
9338
+ * @example Plano Gold
9339
+ */
9340
+ name: string;
9341
+ /**
9342
+ * @description JSON object with plan settings
9343
+ * @example {
9344
+ * "maxUsers": 100
9345
+ * }
9346
+ */
9347
+ settings?: Record<string, never>;
9348
+ /**
9349
+ * @description Whether the plan is active
9350
+ * @default true
9351
+ */
9352
+ isActive: boolean;
9353
+ };
9354
+ UpdatePlanDto: {
9355
+ /** @description Display name of the plan */
9356
+ name?: string;
9357
+ /** @description JSON object with plan settings */
9358
+ settings?: Record<string, never>;
9359
+ /** @description Whether the plan is active */
9360
+ isActive?: boolean;
6628
9361
  };
6629
9362
  StudentWithClass: {
6630
9363
  /** Format: uuid */
@@ -6709,12 +9442,72 @@ export interface components {
6709
9442
  totalStudents?: number;
6710
9443
  year?: number;
6711
9444
  };
6712
- CreateUserDto: {
9445
+ Subscription: {
6713
9446
  /**
6714
9447
  * Format: uuid
6715
- * @description Keycloak User ID
9448
+ * @description Unique identifier for the subscription
6716
9449
  */
6717
9450
  id: string;
9451
+ /**
9452
+ * Format: uuid
9453
+ * @description ID of the associated plan
9454
+ */
9455
+ planId: string;
9456
+ /**
9457
+ * Format: uuid
9458
+ * @description ID of the associated institution (optional)
9459
+ */
9460
+ institutionId?: string | null;
9461
+ /**
9462
+ * Format: uuid
9463
+ * @description ID of the associated group (optional)
9464
+ */
9465
+ groupId?: string | null;
9466
+ /**
9467
+ * Format: date-time
9468
+ * @description Timestamp when the subscription was created
9469
+ */
9470
+ createdAt?: string;
9471
+ plan?: components["schemas"]["Plan"];
9472
+ institution?: components["schemas"]["Institution"];
9473
+ group?: components["schemas"]["Group"];
9474
+ };
9475
+ /** @description At least one of institutionId or groupId must be provided */
9476
+ CreateSubscriptionDto: {
9477
+ /**
9478
+ * Format: uuid
9479
+ * @description ID of the plan to subscribe to
9480
+ */
9481
+ planId: string;
9482
+ /**
9483
+ * Format: uuid
9484
+ * @description ID of the institution (required if groupId is not provided)
9485
+ */
9486
+ institutionId?: string | null;
9487
+ /**
9488
+ * Format: uuid
9489
+ * @description ID of the group (required if institutionId is not provided)
9490
+ */
9491
+ groupId?: string | null;
9492
+ };
9493
+ UpdateSubscriptionDto: {
9494
+ /**
9495
+ * Format: uuid
9496
+ * @description ID of the plan
9497
+ */
9498
+ planId?: string;
9499
+ /**
9500
+ * Format: uuid
9501
+ * @description ID of the institution
9502
+ */
9503
+ institutionId?: string | null;
9504
+ /**
9505
+ * Format: uuid
9506
+ * @description ID of the group
9507
+ */
9508
+ groupId?: string | null;
9509
+ };
9510
+ CreateUserDto: {
6718
9511
  /** @example John */
6719
9512
  firstName: string;
6720
9513
  /** @example Doe */
@@ -6724,10 +9517,15 @@ export interface components {
6724
9517
  * @example john.doe@example.com
6725
9518
  */
6726
9519
  email: string;
9520
+ /**
9521
+ * @description Password for the user's Keycloak account
9522
+ * @example SecurePassword123!
9523
+ */
9524
+ password: string;
6727
9525
  /** @example +5511999999999 */
6728
9526
  phone?: string;
6729
9527
  /** @example 12345678901 */
6730
- document?: number;
9528
+ document: string;
6731
9529
  /**
6732
9530
  * @example male
6733
9531
  * @enum {string}
@@ -6738,6 +9536,18 @@ export interface components {
6738
9536
  * @example 1990-01-01T00:00:00Z
6739
9537
  */
6740
9538
  birthdate?: string;
9539
+ /**
9540
+ * Format: uuid
9541
+ * @description Optional group ID to associate the user with a group
9542
+ * @example 550e8400-e29b-41d4-a716-446655440000
9543
+ */
9544
+ groupId?: string;
9545
+ /**
9546
+ * Format: uuid
9547
+ * @description Optional institution ID to register the user (requires groupId)
9548
+ * @example 550e8400-e29b-41d4-a716-446655440001
9549
+ */
9550
+ institutionId?: string;
6741
9551
  };
6742
9552
  UserResponse: components["schemas"]["User"];
6743
9553
  CreateInstitutionDto: {
@@ -6860,40 +9670,25 @@ export interface components {
6860
9670
  /** Format: uuid */
6861
9671
  userId: string;
6862
9672
  /** Format: uuid */
6863
- courseId?: string;
9673
+ quizAttemptId?: string;
6864
9674
  /** 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;
9675
+ certificateTemplateId: string;
9676
+ /** @example CERT-2024-000001 */
9677
+ certificateNumber: string;
9678
+ /**
9679
+ * Format: uri
9680
+ * @example https://example.com/certificates/cert-123.pdf
9681
+ */
9682
+ url?: string;
6881
9683
  };
6882
9684
  UpdateCertificateDto: {
6883
- quizTitle?: string;
6884
- quizCategory?: string;
6885
- attemptScore?: number;
6886
- attemptPassed?: boolean;
6887
- attemptTimeTakenInMinutes?: number;
6888
- /** Format: date-time */
6889
- attemptCompletedAt?: string;
9685
+ /** Format: uuid */
9686
+ quizAttemptId?: string;
9687
+ /** Format: uuid */
9688
+ certificateTemplateId?: string;
6890
9689
  certificateNumber?: string;
6891
- /** Format: date-time */
6892
- certificateIssuedAt?: string;
6893
9690
  /** Format: uri */
6894
- certificateDownloadUrl?: string;
6895
- /** Format: date-time */
6896
- dispatchedAt?: string;
9691
+ url?: string;
6897
9692
  };
6898
9693
  CreateGuardianDto: {
6899
9694
  /**
@@ -6981,6 +9776,275 @@ export interface components {
6981
9776
  /** Format: uuid */
6982
9777
  institutionId: string;
6983
9778
  };
9779
+ Quiz: {
9780
+ /** Format: uuid */
9781
+ id?: string;
9782
+ /** Format: uuid */
9783
+ courseId?: string;
9784
+ /** @example JavaScript Fundamentals Quiz */
9785
+ title?: string;
9786
+ /** @example Test your knowledge of JavaScript basics */
9787
+ description?: string;
9788
+ /**
9789
+ * @default 70
9790
+ * @example 70
9791
+ */
9792
+ passingScore: number;
9793
+ /**
9794
+ * @description Time limit in minutes
9795
+ * @example 60
9796
+ */
9797
+ timeLimit?: number;
9798
+ /** @example 3 */
9799
+ maxAttempts?: number;
9800
+ /** @default false */
9801
+ randomizeQuestions: boolean;
9802
+ /** @default true */
9803
+ showCorrectAnswers: boolean;
9804
+ /** @default true */
9805
+ isActive: boolean;
9806
+ /** Format: uuid */
9807
+ createdBy?: string;
9808
+ /** Format: date-time */
9809
+ createdAt?: string;
9810
+ /** Format: date-time */
9811
+ updatedAt?: string;
9812
+ };
9813
+ CreateQuizDto: {
9814
+ /** Format: uuid */
9815
+ courseId?: string;
9816
+ /** @example JavaScript Fundamentals Quiz */
9817
+ title: string;
9818
+ /** @example Test your knowledge of JavaScript basics */
9819
+ description?: string;
9820
+ /** @example 70 */
9821
+ passingScore?: number;
9822
+ /** @example 60 */
9823
+ timeLimit?: number;
9824
+ /** @example 3 */
9825
+ maxAttempts?: number;
9826
+ randomizeQuestions?: boolean;
9827
+ showCorrectAnswers?: boolean;
9828
+ isActive?: boolean;
9829
+ /** Format: uuid */
9830
+ createdBy: string;
9831
+ };
9832
+ UpdateQuizDto: {
9833
+ /** Format: uuid */
9834
+ courseId?: string;
9835
+ title?: string;
9836
+ description?: string;
9837
+ passingScore?: number;
9838
+ timeLimit?: number;
9839
+ maxAttempts?: number;
9840
+ randomizeQuestions?: boolean;
9841
+ showCorrectAnswers?: boolean;
9842
+ isActive?: boolean;
9843
+ };
9844
+ QuizQuestion: {
9845
+ /** Format: uuid */
9846
+ id?: string;
9847
+ /** Format: uuid */
9848
+ quizId?: string;
9849
+ /** @example What is a closure in JavaScript? */
9850
+ text?: string;
9851
+ /**
9852
+ * @example multiple_choice
9853
+ * @enum {string}
9854
+ */
9855
+ type?: "multiple_choice" | "true_false" | "open";
9856
+ /**
9857
+ * @default 1
9858
+ * @example 1
9859
+ */
9860
+ order: number;
9861
+ /**
9862
+ * @default 1
9863
+ * @example 1
9864
+ */
9865
+ points: number;
9866
+ /** Format: date-time */
9867
+ createdAt?: string;
9868
+ /** Format: date-time */
9869
+ updatedAt?: string;
9870
+ };
9871
+ CreateQuizQuestionDto: {
9872
+ /** Format: uuid */
9873
+ quizId: string;
9874
+ /** @example What is a closure in JavaScript? */
9875
+ text: string;
9876
+ /**
9877
+ * @example multiple_choice
9878
+ * @enum {string}
9879
+ */
9880
+ type: "multiple_choice" | "true_false" | "open";
9881
+ order?: number;
9882
+ points?: number;
9883
+ };
9884
+ UpdateQuizQuestionDto: {
9885
+ text?: string;
9886
+ /** @enum {string} */
9887
+ type?: "multiple_choice" | "true_false" | "open";
9888
+ order?: number;
9889
+ points?: number;
9890
+ };
9891
+ QuizQuestionAnswer: {
9892
+ /** Format: uuid */
9893
+ id?: string;
9894
+ /** Format: uuid */
9895
+ questionId?: string;
9896
+ /** @example A closure is a function that has access to its outer function scope */
9897
+ answer?: string;
9898
+ /** @example true */
9899
+ isCorrect?: boolean;
9900
+ /** Format: date-time */
9901
+ createdAt?: string;
9902
+ /** Format: date-time */
9903
+ updatedAt?: string;
9904
+ };
9905
+ CreateQuizQuestionAnswerDto: {
9906
+ /** Format: uuid */
9907
+ questionId: string;
9908
+ /** @example A closure is a function that has access to its outer function scope */
9909
+ answer: string;
9910
+ /** @example true */
9911
+ isCorrect: boolean;
9912
+ };
9913
+ UpdateQuizQuestionAnswerDto: {
9914
+ answer?: string;
9915
+ isCorrect?: boolean;
9916
+ };
9917
+ QuizAttempt: {
9918
+ /** Format: uuid */
9919
+ id?: string;
9920
+ /** Format: uuid */
9921
+ quizId?: string;
9922
+ /** Format: uuid */
9923
+ userId?: string;
9924
+ /**
9925
+ * @default 0
9926
+ * @example 85
9927
+ */
9928
+ score: number;
9929
+ /**
9930
+ * @default false
9931
+ * @example true
9932
+ */
9933
+ passed: boolean;
9934
+ /** Format: date-time */
9935
+ startedAt?: string;
9936
+ /** Format: date-time */
9937
+ completedAt?: string;
9938
+ /** Format: date-time */
9939
+ createdAt?: string;
9940
+ /** Format: date-time */
9941
+ updatedAt?: string;
9942
+ };
9943
+ CreateQuizAttemptDto: {
9944
+ /** Format: uuid */
9945
+ quizId: string;
9946
+ /** Format: uuid */
9947
+ userId: string;
9948
+ score?: number;
9949
+ passed?: boolean;
9950
+ /** Format: date-time */
9951
+ startedAt?: string;
9952
+ };
9953
+ UpdateQuizAttemptDto: {
9954
+ score?: number;
9955
+ passed?: boolean;
9956
+ /** Format: date-time */
9957
+ completedAt?: string;
9958
+ };
9959
+ QuizAttemptAnswer: {
9960
+ /** Format: uuid */
9961
+ id?: string;
9962
+ /** Format: uuid */
9963
+ quizAttemptId?: string;
9964
+ /** Format: uuid */
9965
+ quizQuestionAnswerId?: string;
9966
+ /** Format: date-time */
9967
+ createdAt?: string;
9968
+ /** Format: date-time */
9969
+ updatedAt?: string;
9970
+ };
9971
+ CreateQuizAttemptAnswerDto: {
9972
+ /** Format: uuid */
9973
+ quizAttemptId: string;
9974
+ /** Format: uuid */
9975
+ quizQuestionAnswerId: string;
9976
+ };
9977
+ CertificateTemplate: {
9978
+ /** Format: uuid */
9979
+ id?: string;
9980
+ /** @example Default Certificate Template */
9981
+ name?: string;
9982
+ /** @example Standard certificate template for course completion */
9983
+ description?: string;
9984
+ /**
9985
+ * @example {
9986
+ * "background_image_url": "https://example.com/bg.png",
9987
+ * "logo_url": "https://example.com/logo.png",
9988
+ * "text_color": "#000000",
9989
+ * "font_family": "Arial"
9990
+ * }
9991
+ */
9992
+ templateData?: {
9993
+ [key: string]: unknown;
9994
+ };
9995
+ /** @default false */
9996
+ isDefault: boolean;
9997
+ /** Format: uuid */
9998
+ quizId?: string;
9999
+ /** Format: uuid */
10000
+ courseId?: string;
10001
+ /** Format: uuid */
10002
+ organizationId?: string;
10003
+ /** Format: uuid */
10004
+ institutionId?: string;
10005
+ /** @default true */
10006
+ isActive: boolean;
10007
+ /** Format: date-time */
10008
+ createdAt?: string;
10009
+ /** Format: date-time */
10010
+ updatedAt?: string;
10011
+ };
10012
+ CreateCertificateTemplateDto: {
10013
+ /** @example Default Certificate Template */
10014
+ name: string;
10015
+ /** @example Standard certificate template for course completion */
10016
+ description?: string;
10017
+ templateData?: {
10018
+ [key: string]: unknown;
10019
+ };
10020
+ isDefault?: boolean;
10021
+ /** Format: uuid */
10022
+ quizId?: string;
10023
+ /** Format: uuid */
10024
+ courseId?: string;
10025
+ /** Format: uuid */
10026
+ organizationId?: string;
10027
+ /** Format: uuid */
10028
+ institutionId?: string;
10029
+ isActive?: boolean;
10030
+ };
10031
+ UpdateCertificateTemplateDto: {
10032
+ name?: string;
10033
+ description?: string;
10034
+ templateData?: {
10035
+ [key: string]: unknown;
10036
+ };
10037
+ isDefault?: boolean;
10038
+ /** Format: uuid */
10039
+ quizId?: string;
10040
+ /** Format: uuid */
10041
+ courseId?: string;
10042
+ /** Format: uuid */
10043
+ organizationId?: string;
10044
+ /** Format: uuid */
10045
+ institutionId?: string;
10046
+ isActive?: boolean;
10047
+ };
6984
10048
  };
6985
10049
  responses: {
6986
10050
  /** @description Resource not found */