academe-kit 0.2.0 → 0.2.2

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.
@@ -461,6 +461,65 @@ export declare function createInstitutionService(apiClient: AcademeApiClient): {
461
461
  };
462
462
  };
463
463
  }, `${string}/${string}`>>;
464
+ getUsers(institutionId: string, options?: {
465
+ classroomId?: string;
466
+ isStudent?: boolean;
467
+ isActive?: boolean;
468
+ hasCertificates?: boolean;
469
+ hasGuardian?: boolean;
470
+ search?: string;
471
+ page?: number;
472
+ limit?: number;
473
+ }): Promise<import("openapi-fetch").FetchResponse<{
474
+ parameters: {
475
+ query?: {
476
+ classroomId?: string;
477
+ isStudent?: boolean;
478
+ isActive?: boolean;
479
+ hasCertificates?: boolean;
480
+ hasGuardian?: boolean;
481
+ search?: string;
482
+ page?: number;
483
+ limit?: number;
484
+ };
485
+ header?: never;
486
+ path: {
487
+ institutionId: string;
488
+ };
489
+ cookie?: never;
490
+ };
491
+ requestBody?: never;
492
+ responses: {
493
+ 200: {
494
+ headers: {
495
+ [name: string]: unknown;
496
+ };
497
+ content: {
498
+ "application/json": components["schemas"]["InstitutionUserListResponse"];
499
+ };
500
+ };
501
+ 400: components["responses"]["BadRequest"];
502
+ 401: components["responses"]["Unauthorized"];
503
+ 404: components["responses"]["NotFound"];
504
+ 500: components["responses"]["ServerError"];
505
+ };
506
+ }, {
507
+ params: {
508
+ path: {
509
+ institutionId: string;
510
+ };
511
+ query: {
512
+ classroomId?: string;
513
+ isStudent?: boolean;
514
+ isActive?: boolean;
515
+ hasCertificates?: boolean;
516
+ hasGuardian?: boolean;
517
+ search?: string;
518
+ page?: number;
519
+ limit?: number;
520
+ } | undefined;
521
+ };
522
+ }, `${string}/${string}`>>;
464
523
  getRegistrations(institutionId: string): Promise<import("openapi-fetch").FetchResponse<{
465
524
  parameters: {
466
525
  query?: never;
@@ -3476,6 +3476,69 @@ export interface paths {
3476
3476
  };
3477
3477
  trace?: never;
3478
3478
  };
3479
+ "/institutions/{institutionId}/users": {
3480
+ parameters: {
3481
+ query?: never;
3482
+ header?: never;
3483
+ path?: never;
3484
+ cookie?: never;
3485
+ };
3486
+ /**
3487
+ * List all users from an institution
3488
+ * @description Retrieve a paginated list of all users registered in an institution with advanced filtering options
3489
+ */
3490
+ get: {
3491
+ parameters: {
3492
+ query?: {
3493
+ /** @description Filter by classroom (institution_classroom_id) */
3494
+ classroomId?: string;
3495
+ /** @description Filter by student status (true = students only, false = non-students only) */
3496
+ isStudent?: boolean;
3497
+ /** @description Filter by user active status */
3498
+ isActive?: boolean;
3499
+ /** @description Filter users with certificates (true) or without (false) */
3500
+ hasCertificates?: boolean;
3501
+ /** @description Filter users with guardian (true) or without (false) */
3502
+ hasGuardian?: boolean;
3503
+ /** @description Search by email, first name, last name, or full name (case-insensitive) */
3504
+ search?: string;
3505
+ /** @description Page number */
3506
+ page?: number;
3507
+ /** @description Items per page */
3508
+ limit?: number;
3509
+ };
3510
+ header?: never;
3511
+ path: {
3512
+ /** @description Institution ID */
3513
+ institutionId: string;
3514
+ };
3515
+ cookie?: never;
3516
+ };
3517
+ requestBody?: never;
3518
+ responses: {
3519
+ /** @description List of users from the institution */
3520
+ 200: {
3521
+ headers: {
3522
+ [name: string]: unknown;
3523
+ };
3524
+ content: {
3525
+ "application/json": components["schemas"]["InstitutionUserListResponse"];
3526
+ };
3527
+ };
3528
+ 400: components["responses"]["BadRequest"];
3529
+ 401: components["responses"]["Unauthorized"];
3530
+ 404: components["responses"]["NotFound"];
3531
+ 500: components["responses"]["ServerError"];
3532
+ };
3533
+ };
3534
+ put?: never;
3535
+ post?: never;
3536
+ delete?: never;
3537
+ options?: never;
3538
+ head?: never;
3539
+ patch?: never;
3540
+ trace?: never;
3541
+ };
3479
3542
  "/organizations": {
3480
3543
  parameters: {
3481
3544
  query?: never;
@@ -5859,6 +5922,115 @@ export interface components {
5859
5922
  updatedAt?: string;
5860
5923
  guardian?: components["schemas"]["Guardian"];
5861
5924
  };
5925
+ /** @description User with institution registration details (returned by GET /institutions/{institutionId}/users) */
5926
+ InstitutionUser: {
5927
+ /**
5928
+ * Format: uuid
5929
+ * @description Keycloak User ID
5930
+ */
5931
+ id?: string;
5932
+ /** @example John */
5933
+ firstName?: string;
5934
+ /** @example Doe */
5935
+ lastName?: string;
5936
+ /**
5937
+ * Format: email
5938
+ * @example john.doe@example.com
5939
+ */
5940
+ email?: string;
5941
+ /** @example +5511999999999 */
5942
+ phone?: string | null;
5943
+ /** @example 12345678901 */
5944
+ document?: string | null;
5945
+ /** @enum {string|null} */
5946
+ gender?: "male" | "female" | "other" | null;
5947
+ /**
5948
+ * @description Indicates if the user is active
5949
+ * @example true
5950
+ */
5951
+ isActive?: boolean;
5952
+ /** Format: date-time */
5953
+ birthdate?: string | null;
5954
+ /** Format: date-time */
5955
+ createdAt?: string;
5956
+ /** Format: date-time */
5957
+ updatedAt?: string;
5958
+ /**
5959
+ * @description Number of certificates the user has
5960
+ * @example 5
5961
+ */
5962
+ certificatesCount?: number;
5963
+ /** @description User's guardian associations */
5964
+ userGuardians?: {
5965
+ /** Format: uuid */
5966
+ id?: string;
5967
+ guardian?: {
5968
+ /** Format: uuid */
5969
+ id?: string;
5970
+ /** @example Maria Silva */
5971
+ name?: string;
5972
+ /**
5973
+ * Format: email
5974
+ * @example maria@example.com
5975
+ */
5976
+ email?: string;
5977
+ /** @example +5511999999999 */
5978
+ phone?: string | null;
5979
+ };
5980
+ }[];
5981
+ /** @description User's registration info in the institution */
5982
+ institutionRegistration?: {
5983
+ /** Format: uuid */
5984
+ id?: string;
5985
+ /**
5986
+ * @description Indicates if the user is registered as a student
5987
+ * @example true
5988
+ */
5989
+ isStudent?: boolean;
5990
+ /**
5991
+ * @description Indicates if the registration is active
5992
+ * @example true
5993
+ */
5994
+ isActive?: boolean;
5995
+ /** @description Classroom assignment details */
5996
+ institutionClassroom?: {
5997
+ /** Format: uuid */
5998
+ id?: string;
5999
+ classroom?: {
6000
+ /** Format: uuid */
6001
+ id?: string;
6002
+ /** @example 9º Ano A */
6003
+ name?: string;
6004
+ /** @description Grade level information */
6005
+ serie?: {
6006
+ /** Format: uuid */
6007
+ id?: string;
6008
+ /**
6009
+ * @description Grade level value (1-12)
6010
+ * @example 9
6011
+ */
6012
+ value?: number;
6013
+ } | null;
6014
+ /** @description Shift information (morning, afternoon, night) */
6015
+ shift?: {
6016
+ /** Format: uuid */
6017
+ id?: string;
6018
+ /**
6019
+ * @example manhã
6020
+ * @enum {string}
6021
+ */
6022
+ name?: "manhã" | "tarde" | "noite";
6023
+ } | null;
6024
+ } | null;
6025
+ } | null;
6026
+ };
6027
+ };
6028
+ InstitutionUserListResponse: {
6029
+ /** @example success */
6030
+ status?: string;
6031
+ data?: components["schemas"]["InstitutionUser"][];
6032
+ meta?: components["schemas"]["PaginationMeta"];
6033
+ };
5862
6034
  InstitutionRegistration: {
5863
6035
  /** Format: uuid */
5864
6036
  id?: string;
@@ -3,6 +3,7 @@ export type User = components['schemas']['User'];
3
3
  export type Institution = components['schemas']['Institution'];
4
4
  export type Classroom = components['schemas']['Classroom'];
5
5
  export type InstitutionClassroom = components['schemas']['InstitutionClassroom'];
6
+ export type InstitutionUser = components['schemas']['InstitutionUser'];
6
7
  export type Organization = components['schemas']['Organization'];
7
8
  export type Serie = components['schemas']['Serie'];
8
9
  export type Shift = components['schemas']['Shift'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "academe-kit",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "A React component library with Tailwind CSS and Storybook",
6
6
  "main": "dist/index.js",