academe-kit 0.2.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +341 -9
- package/dist/index.esm.js +9 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/types/services/InstitutionService.d.ts +59 -0
- package/dist/types/services/ShiftService.d.ts +2 -2
- package/dist/types/types/academe-api.d.ts +277 -6
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -124,7 +124,7 @@ export declare function createShiftService(apiClient: AcademeApiClient): {
|
|
|
124
124
|
};
|
|
125
125
|
}, {
|
|
126
126
|
body: {
|
|
127
|
-
name: "
|
|
127
|
+
name: "manh\u00E3" | "tarde" | "noite";
|
|
128
128
|
};
|
|
129
129
|
}, `${string}/${string}`>>;
|
|
130
130
|
/**
|
|
@@ -169,7 +169,7 @@ export declare function createShiftService(apiClient: AcademeApiClient): {
|
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
171
|
body: {
|
|
172
|
-
name?: "
|
|
172
|
+
name?: "manh\u00E3" | "tarde" | "noite";
|
|
173
173
|
};
|
|
174
174
|
}, `${string}/${string}`>>;
|
|
175
175
|
/**
|
|
@@ -2942,6 +2942,105 @@ export interface paths {
|
|
|
2942
2942
|
};
|
|
2943
2943
|
trace?: never;
|
|
2944
2944
|
};
|
|
2945
|
+
"/institutions/{institutionId}/groups/users": {
|
|
2946
|
+
parameters: {
|
|
2947
|
+
query?: never;
|
|
2948
|
+
header?: never;
|
|
2949
|
+
path?: never;
|
|
2950
|
+
cookie?: never;
|
|
2951
|
+
};
|
|
2952
|
+
/**
|
|
2953
|
+
* Get all users of all groups in an institution
|
|
2954
|
+
* @description Retrieve all users from all groups associated with a specific institution.
|
|
2955
|
+
* Returns a map where keys are group IDs and values are arrays of users in each group.
|
|
2956
|
+
* This is more efficient than calling /groups/{id}/users multiple times.
|
|
2957
|
+
*/
|
|
2958
|
+
get: {
|
|
2959
|
+
parameters: {
|
|
2960
|
+
query?: never;
|
|
2961
|
+
header?: never;
|
|
2962
|
+
path: {
|
|
2963
|
+
/** @description Institution ID */
|
|
2964
|
+
institutionId: string;
|
|
2965
|
+
};
|
|
2966
|
+
cookie?: never;
|
|
2967
|
+
};
|
|
2968
|
+
requestBody?: never;
|
|
2969
|
+
responses: {
|
|
2970
|
+
/** @description Users grouped by group ID */
|
|
2971
|
+
200: {
|
|
2972
|
+
headers: {
|
|
2973
|
+
[name: string]: unknown;
|
|
2974
|
+
};
|
|
2975
|
+
content: {
|
|
2976
|
+
/**
|
|
2977
|
+
* @example {
|
|
2978
|
+
* "status": "success",
|
|
2979
|
+
* "data": {
|
|
2980
|
+
* "group-uuid-1": [
|
|
2981
|
+
* {
|
|
2982
|
+
* "id": "user-uuid-1",
|
|
2983
|
+
* "firstName": "John",
|
|
2984
|
+
* "lastName": "Doe",
|
|
2985
|
+
* "email": "john@example.com",
|
|
2986
|
+
* "assignedAt": "2024-01-15T10:30:00Z"
|
|
2987
|
+
* },
|
|
2988
|
+
* {
|
|
2989
|
+
* "id": "user-uuid-2",
|
|
2990
|
+
* "firstName": "Jane",
|
|
2991
|
+
* "lastName": "Smith",
|
|
2992
|
+
* "email": "jane@example.com",
|
|
2993
|
+
* "assignedAt": "2024-01-16T14:20:00Z"
|
|
2994
|
+
* }
|
|
2995
|
+
* ],
|
|
2996
|
+
* "group-uuid-2": [
|
|
2997
|
+
* {
|
|
2998
|
+
* "id": "user-uuid-3",
|
|
2999
|
+
* "firstName": "Bob",
|
|
3000
|
+
* "lastName": "Wilson",
|
|
3001
|
+
* "email": "bob@example.com",
|
|
3002
|
+
* "assignedAt": "2024-01-17T09:15:00Z"
|
|
3003
|
+
* }
|
|
3004
|
+
* ]
|
|
3005
|
+
* }
|
|
3006
|
+
* }
|
|
3007
|
+
*/
|
|
3008
|
+
"application/json": {
|
|
3009
|
+
/** @example success */
|
|
3010
|
+
status?: string;
|
|
3011
|
+
/** @description Map of group IDs to arrays of users */
|
|
3012
|
+
data?: {
|
|
3013
|
+
[key: string]: {
|
|
3014
|
+
/** Format: uuid */
|
|
3015
|
+
id?: string;
|
|
3016
|
+
firstName?: string;
|
|
3017
|
+
lastName?: string;
|
|
3018
|
+
email?: string;
|
|
3019
|
+
document?: string;
|
|
3020
|
+
phone?: string;
|
|
3021
|
+
isActive?: boolean;
|
|
3022
|
+
/** Format: date-time */
|
|
3023
|
+
assignedAt?: string;
|
|
3024
|
+
/** Format: uuid */
|
|
3025
|
+
assignedBy?: string;
|
|
3026
|
+
}[];
|
|
3027
|
+
};
|
|
3028
|
+
};
|
|
3029
|
+
};
|
|
3030
|
+
};
|
|
3031
|
+
401: components["responses"]["Unauthorized"];
|
|
3032
|
+
404: components["responses"]["NotFound"];
|
|
3033
|
+
500: components["responses"]["ServerError"];
|
|
3034
|
+
};
|
|
3035
|
+
};
|
|
3036
|
+
put?: never;
|
|
3037
|
+
post?: never;
|
|
3038
|
+
delete?: never;
|
|
3039
|
+
options?: never;
|
|
3040
|
+
head?: never;
|
|
3041
|
+
patch?: never;
|
|
3042
|
+
trace?: never;
|
|
3043
|
+
};
|
|
2945
3044
|
"/institutions/{institutionId}/registrations": {
|
|
2946
3045
|
parameters: {
|
|
2947
3046
|
query?: never;
|
|
@@ -3476,6 +3575,69 @@ export interface paths {
|
|
|
3476
3575
|
};
|
|
3477
3576
|
trace?: never;
|
|
3478
3577
|
};
|
|
3578
|
+
"/institutions/{institutionId}/users": {
|
|
3579
|
+
parameters: {
|
|
3580
|
+
query?: never;
|
|
3581
|
+
header?: never;
|
|
3582
|
+
path?: never;
|
|
3583
|
+
cookie?: never;
|
|
3584
|
+
};
|
|
3585
|
+
/**
|
|
3586
|
+
* List all users from an institution
|
|
3587
|
+
* @description Retrieve a paginated list of all users registered in an institution with advanced filtering options
|
|
3588
|
+
*/
|
|
3589
|
+
get: {
|
|
3590
|
+
parameters: {
|
|
3591
|
+
query?: {
|
|
3592
|
+
/** @description Filter by classroom (institution_classroom_id) */
|
|
3593
|
+
classroomId?: string;
|
|
3594
|
+
/** @description Filter by student status (true = students only, false = non-students only) */
|
|
3595
|
+
isStudent?: boolean;
|
|
3596
|
+
/** @description Filter by user active status */
|
|
3597
|
+
isActive?: boolean;
|
|
3598
|
+
/** @description Filter users with certificates (true) or without (false) */
|
|
3599
|
+
hasCertificates?: boolean;
|
|
3600
|
+
/** @description Filter users with guardian (true) or without (false) */
|
|
3601
|
+
hasGuardian?: boolean;
|
|
3602
|
+
/** @description Search by email, first name, last name, or full name (case-insensitive) */
|
|
3603
|
+
search?: string;
|
|
3604
|
+
/** @description Page number */
|
|
3605
|
+
page?: number;
|
|
3606
|
+
/** @description Items per page */
|
|
3607
|
+
limit?: number;
|
|
3608
|
+
};
|
|
3609
|
+
header?: never;
|
|
3610
|
+
path: {
|
|
3611
|
+
/** @description Institution ID */
|
|
3612
|
+
institutionId: string;
|
|
3613
|
+
};
|
|
3614
|
+
cookie?: never;
|
|
3615
|
+
};
|
|
3616
|
+
requestBody?: never;
|
|
3617
|
+
responses: {
|
|
3618
|
+
/** @description List of users from the institution */
|
|
3619
|
+
200: {
|
|
3620
|
+
headers: {
|
|
3621
|
+
[name: string]: unknown;
|
|
3622
|
+
};
|
|
3623
|
+
content: {
|
|
3624
|
+
"application/json": components["schemas"]["InstitutionUserListResponse"];
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3627
|
+
400: components["responses"]["BadRequest"];
|
|
3628
|
+
401: components["responses"]["Unauthorized"];
|
|
3629
|
+
404: components["responses"]["NotFound"];
|
|
3630
|
+
500: components["responses"]["ServerError"];
|
|
3631
|
+
};
|
|
3632
|
+
};
|
|
3633
|
+
put?: never;
|
|
3634
|
+
post?: never;
|
|
3635
|
+
delete?: never;
|
|
3636
|
+
options?: never;
|
|
3637
|
+
head?: never;
|
|
3638
|
+
patch?: never;
|
|
3639
|
+
trace?: never;
|
|
3640
|
+
};
|
|
3479
3641
|
"/organizations": {
|
|
3480
3642
|
parameters: {
|
|
3481
3643
|
query?: never;
|
|
@@ -4882,7 +5044,7 @@ export interface paths {
|
|
|
4882
5044
|
};
|
|
4883
5045
|
/**
|
|
4884
5046
|
* List all shifts
|
|
4885
|
-
* @description Retrieve a list of all institution shifts (
|
|
5047
|
+
* @description Retrieve a list of all institution shifts (manhã, tarde, noite)
|
|
4886
5048
|
*/
|
|
4887
5049
|
get: {
|
|
4888
5050
|
parameters: {
|
|
@@ -5859,6 +6021,115 @@ export interface components {
|
|
|
5859
6021
|
updatedAt?: string;
|
|
5860
6022
|
guardian?: components["schemas"]["Guardian"];
|
|
5861
6023
|
};
|
|
6024
|
+
/** @description User with institution registration details (returned by GET /institutions/{institutionId}/users) */
|
|
6025
|
+
InstitutionUser: {
|
|
6026
|
+
/**
|
|
6027
|
+
* Format: uuid
|
|
6028
|
+
* @description Keycloak User ID
|
|
6029
|
+
*/
|
|
6030
|
+
id?: string;
|
|
6031
|
+
/** @example John */
|
|
6032
|
+
firstName?: string;
|
|
6033
|
+
/** @example Doe */
|
|
6034
|
+
lastName?: string;
|
|
6035
|
+
/**
|
|
6036
|
+
* Format: email
|
|
6037
|
+
* @example john.doe@example.com
|
|
6038
|
+
*/
|
|
6039
|
+
email?: string;
|
|
6040
|
+
/** @example +5511999999999 */
|
|
6041
|
+
phone?: string | null;
|
|
6042
|
+
/** @example 12345678901 */
|
|
6043
|
+
document?: string | null;
|
|
6044
|
+
/** @enum {string|null} */
|
|
6045
|
+
gender?: "male" | "female" | "other" | null;
|
|
6046
|
+
/**
|
|
6047
|
+
* @description Indicates if the user is active
|
|
6048
|
+
* @example true
|
|
6049
|
+
*/
|
|
6050
|
+
isActive?: boolean;
|
|
6051
|
+
/** Format: date-time */
|
|
6052
|
+
birthdate?: string | null;
|
|
6053
|
+
/** Format: date-time */
|
|
6054
|
+
createdAt?: string;
|
|
6055
|
+
/** Format: date-time */
|
|
6056
|
+
updatedAt?: string;
|
|
6057
|
+
/**
|
|
6058
|
+
* @description Number of certificates the user has
|
|
6059
|
+
* @example 5
|
|
6060
|
+
*/
|
|
6061
|
+
certificatesCount?: number;
|
|
6062
|
+
/** @description User's guardian associations */
|
|
6063
|
+
userGuardians?: {
|
|
6064
|
+
/** Format: uuid */
|
|
6065
|
+
id?: string;
|
|
6066
|
+
guardian?: {
|
|
6067
|
+
/** Format: uuid */
|
|
6068
|
+
id?: string;
|
|
6069
|
+
/** @example Maria Silva */
|
|
6070
|
+
name?: string;
|
|
6071
|
+
/**
|
|
6072
|
+
* Format: email
|
|
6073
|
+
* @example maria@example.com
|
|
6074
|
+
*/
|
|
6075
|
+
email?: string;
|
|
6076
|
+
/** @example +5511999999999 */
|
|
6077
|
+
phone?: string | null;
|
|
6078
|
+
};
|
|
6079
|
+
}[];
|
|
6080
|
+
/** @description User's registration info in the institution */
|
|
6081
|
+
institutionRegistration?: {
|
|
6082
|
+
/** Format: uuid */
|
|
6083
|
+
id?: string;
|
|
6084
|
+
/**
|
|
6085
|
+
* @description Indicates if the user is registered as a student
|
|
6086
|
+
* @example true
|
|
6087
|
+
*/
|
|
6088
|
+
isStudent?: boolean;
|
|
6089
|
+
/**
|
|
6090
|
+
* @description Indicates if the registration is active
|
|
6091
|
+
* @example true
|
|
6092
|
+
*/
|
|
6093
|
+
isActive?: boolean;
|
|
6094
|
+
/** @description Classroom assignment details */
|
|
6095
|
+
institutionClassroom?: {
|
|
6096
|
+
/** Format: uuid */
|
|
6097
|
+
id?: string;
|
|
6098
|
+
classroom?: {
|
|
6099
|
+
/** Format: uuid */
|
|
6100
|
+
id?: string;
|
|
6101
|
+
/** @example 9º Ano A */
|
|
6102
|
+
name?: string;
|
|
6103
|
+
/** @description Grade level information */
|
|
6104
|
+
serie?: {
|
|
6105
|
+
/** Format: uuid */
|
|
6106
|
+
id?: string;
|
|
6107
|
+
/**
|
|
6108
|
+
* @description Grade level value (1-12)
|
|
6109
|
+
* @example 9
|
|
6110
|
+
*/
|
|
6111
|
+
value?: number;
|
|
6112
|
+
} | null;
|
|
6113
|
+
/** @description Shift information (manhã, tarde, noite) */
|
|
6114
|
+
shift?: {
|
|
6115
|
+
/** Format: uuid */
|
|
6116
|
+
id?: string;
|
|
6117
|
+
/**
|
|
6118
|
+
* @example manhã
|
|
6119
|
+
* @enum {string}
|
|
6120
|
+
*/
|
|
6121
|
+
name?: "manhã" | "tarde" | "noite";
|
|
6122
|
+
} | null;
|
|
6123
|
+
} | null;
|
|
6124
|
+
} | null;
|
|
6125
|
+
};
|
|
6126
|
+
};
|
|
6127
|
+
InstitutionUserListResponse: {
|
|
6128
|
+
/** @example success */
|
|
6129
|
+
status?: string;
|
|
6130
|
+
data?: components["schemas"]["InstitutionUser"][];
|
|
6131
|
+
meta?: components["schemas"]["PaginationMeta"];
|
|
6132
|
+
};
|
|
5862
6133
|
InstitutionRegistration: {
|
|
5863
6134
|
/** Format: uuid */
|
|
5864
6135
|
id?: string;
|
|
@@ -6155,7 +6426,7 @@ export interface components {
|
|
|
6155
6426
|
createdAt?: string;
|
|
6156
6427
|
/** Format: date-time */
|
|
6157
6428
|
updatedAt?: string;
|
|
6158
|
-
/** @description Shift information (
|
|
6429
|
+
/** @description Shift information (manhã, tarde, noite) */
|
|
6159
6430
|
shift?: components["schemas"]["Shift"];
|
|
6160
6431
|
/** @description Serie/grade level information */
|
|
6161
6432
|
serie?: components["schemas"]["Serie"];
|
|
@@ -6670,17 +6941,17 @@ export interface components {
|
|
|
6670
6941
|
};
|
|
6671
6942
|
CreateShiftDto: {
|
|
6672
6943
|
/**
|
|
6673
|
-
* @example
|
|
6944
|
+
* @example manhã
|
|
6674
6945
|
* @enum {string}
|
|
6675
6946
|
*/
|
|
6676
|
-
name: "
|
|
6947
|
+
name: "manhã" | "tarde" | "noite";
|
|
6677
6948
|
};
|
|
6678
6949
|
UpdateShiftDto: {
|
|
6679
6950
|
/**
|
|
6680
|
-
* @example
|
|
6951
|
+
* @example manhã
|
|
6681
6952
|
* @enum {string}
|
|
6682
6953
|
*/
|
|
6683
|
-
name?: "
|
|
6954
|
+
name?: "manhã" | "tarde" | "noite";
|
|
6684
6955
|
};
|
|
6685
6956
|
AssignGuardianToUserDto: {
|
|
6686
6957
|
/** Format: uuid */
|
|
@@ -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'];
|