nazar-salary 2.6.0 → 2.7.0
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/index.d.ts +13 -4
- package/index.js +6 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -472,15 +472,24 @@ declare module 'nazar-salary' {
|
|
|
472
472
|
transfer_date: number;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
export interface LessonGroupStudent {
|
|
476
|
+
id: number;
|
|
477
|
+
name: string;
|
|
478
|
+
}
|
|
479
|
+
|
|
475
480
|
export interface LessonGroup {
|
|
476
481
|
lesson_group_id: number;
|
|
477
482
|
lesson_group_name: string;
|
|
478
|
-
|
|
479
|
-
|
|
483
|
+
group_type: string;
|
|
484
|
+
teacher_name: string;
|
|
485
|
+
students: LessonGroupStudent[];
|
|
486
|
+
current_count: number;
|
|
487
|
+
max_count: number;
|
|
488
|
+
available: boolean;
|
|
480
489
|
}
|
|
481
490
|
|
|
482
491
|
export interface LessonGroupsResponse {
|
|
483
|
-
|
|
492
|
+
lesson_groups: LessonGroup[];
|
|
484
493
|
}
|
|
485
494
|
|
|
486
495
|
export interface StudentCourse {
|
|
@@ -1021,7 +1030,7 @@ declare module 'nazar-salary' {
|
|
|
1021
1030
|
|
|
1022
1031
|
// Student endpoints
|
|
1023
1032
|
createStudent(data: CreateStudentData): Promise<CreateStudentResponse>;
|
|
1024
|
-
getLessonGroups(): Promise<LessonGroupsResponse>;
|
|
1033
|
+
getLessonGroups(managerId?: number): Promise<LessonGroupsResponse>;
|
|
1025
1034
|
updateStudent(studentId: number, data: UpdateStudentData): Promise<UpdateStudentResponse>;
|
|
1026
1035
|
transferStudent(studentId: number, data: TransferStudentData): Promise<TransferResponse>;
|
|
1027
1036
|
changeStudentManager(studentId: number, data: ChangeStudentManagerData): Promise<ChangeStudentManagerResponse>;
|
package/index.js
CHANGED
|
@@ -495,10 +495,13 @@ class SalaryAPI {
|
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
497
|
* Get available lesson groups for duet/trio (requireAuth)
|
|
498
|
-
* @
|
|
498
|
+
* @param {number} [managerId] - Manager ID (required for admin users)
|
|
499
|
+
* @returns {Promise<{lesson_groups: Array<{lesson_group_id: number, lesson_group_name: string, group_type: string, teacher_name: string, students: Array, current_count: number, max_count: number, available: boolean}>}>}
|
|
499
500
|
*/
|
|
500
|
-
async getLessonGroups() {
|
|
501
|
-
|
|
501
|
+
async getLessonGroups(managerId) {
|
|
502
|
+
const params = {};
|
|
503
|
+
if (managerId !== undefined) params.manager_id = managerId;
|
|
504
|
+
return await this.client.get("/api/v1/student/lesson-groups", { params });
|
|
502
505
|
}
|
|
503
506
|
|
|
504
507
|
/**
|