nazar-salary 3.2.9 → 3.3.1
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 +12 -9
- package/index.js +15 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1625,6 +1625,14 @@ declare module 'nazar-salary' {
|
|
|
1625
1625
|
*/
|
|
1626
1626
|
getTeacherExpensesForecast(monthsAhead?: number): Promise<TeacherExpensesForecastResponse>;
|
|
1627
1627
|
|
|
1628
|
+
// Export endpoints
|
|
1629
|
+
/**
|
|
1630
|
+
* Export students by manager as Excel file (Admin only)
|
|
1631
|
+
* @param managerId Manager (МЗК) ID (required)
|
|
1632
|
+
* @param month Period filter in YYYY-MM format (optional). If omitted, all students are exported.
|
|
1633
|
+
*/
|
|
1634
|
+
exportStudentsByManager(managerId: number, month?: string): Promise<ArrayBuffer>;
|
|
1635
|
+
|
|
1628
1636
|
// Custom request
|
|
1629
1637
|
request(method: string, path: string, data?: any): Promise<any>;
|
|
1630
1638
|
}
|
|
@@ -1653,16 +1661,11 @@ declare module 'nazar-salary' {
|
|
|
1653
1661
|
total_salary: number;
|
|
1654
1662
|
forecast_salary: number;
|
|
1655
1663
|
real_salary: number | null;
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
student_id: number;
|
|
1659
|
-
student_name: string;
|
|
1664
|
+
teachers_count: number;
|
|
1665
|
+
teachers: Array<{
|
|
1660
1666
|
teacher_id: number;
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
rate_per_lesson: number;
|
|
1664
|
-
monthly_salary: number;
|
|
1665
|
-
remaining_months: number;
|
|
1667
|
+
teacher_name: string;
|
|
1668
|
+
total_salary: number;
|
|
1666
1669
|
}>;
|
|
1667
1670
|
}>;
|
|
1668
1671
|
risk_analysis: {
|
package/index.js
CHANGED
|
@@ -993,6 +993,21 @@ class SalaryAPI {
|
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
995
|
|
|
996
|
+
/**
|
|
997
|
+
* Export students by manager as Excel file (Admin only)
|
|
998
|
+
* @param {number} managerId - Manager (МЗК) ID (required)
|
|
999
|
+
* @param {string} [month] - Period filter in YYYY-MM format (optional)
|
|
1000
|
+
* @returns {Promise<Buffer>} Excel file buffer
|
|
1001
|
+
*/
|
|
1002
|
+
async exportStudentsByManager(managerId, month) {
|
|
1003
|
+
const params = { manager_id: managerId };
|
|
1004
|
+
if (month !== undefined) params.month = month;
|
|
1005
|
+
return await this.client.get("/api/v1/students/export", {
|
|
1006
|
+
params,
|
|
1007
|
+
responseType: "arraybuffer",
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
|
|
996
1011
|
// ===== CUSTOM REQUEST =====
|
|
997
1012
|
|
|
998
1013
|
/**
|