nazar-salary 3.2.7 → 3.2.9
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 +6 -1
- package/index.js +6 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -666,6 +666,8 @@ declare module 'nazar-salary' {
|
|
|
666
666
|
operation_number?: string;
|
|
667
667
|
purchase_amount?: number;
|
|
668
668
|
prepayment?: boolean;
|
|
669
|
+
/** Unix timestamp (ms) — дата записи студента */
|
|
670
|
+
created_at?: number;
|
|
669
671
|
}
|
|
670
672
|
|
|
671
673
|
export interface TransferStudentData {
|
|
@@ -1548,7 +1550,10 @@ declare module 'nazar-salary' {
|
|
|
1548
1550
|
getManagerStudentsAdmin(managerId: number, params?: StudentsListParams): Promise<StudentsListResponse>;
|
|
1549
1551
|
|
|
1550
1552
|
// Dashboard endpoints
|
|
1551
|
-
|
|
1553
|
+
/**
|
|
1554
|
+
* @param month Optional month in MM.YYYY format (e.g. "04.2026"). Defaults to current month.
|
|
1555
|
+
*/
|
|
1556
|
+
getDashboard(month?: string): Promise<DashboardResponse>;
|
|
1552
1557
|
|
|
1553
1558
|
// Salary endpoints
|
|
1554
1559
|
getManagerSalary(month: string, managerId?: number): Promise<ManagerSalaryResponse>;
|
package/index.js
CHANGED
|
@@ -564,6 +564,7 @@ class SalaryAPI {
|
|
|
564
564
|
* @param {string} [data.operation_number] - Operation number (must be sent with purchase_amount)
|
|
565
565
|
* @param {number} [data.purchase_amount] - Purchase amount (must be sent with operation_number)
|
|
566
566
|
* @param {boolean} [data.prepayment] - Prepayment flag
|
|
567
|
+
* @param {number} [data.created_at] - Unix timestamp (ms) — дата записи студента
|
|
567
568
|
* @returns {Promise<object>}
|
|
568
569
|
*/
|
|
569
570
|
async updateStudent(studentId, data) {
|
|
@@ -618,10 +619,13 @@ class SalaryAPI {
|
|
|
618
619
|
|
|
619
620
|
/**
|
|
620
621
|
* Get admin dashboard summary (Admin only)
|
|
622
|
+
* @param {string} [month] - Month in MM.YYYY format (e.g. "04.2026"). Defaults to current month.
|
|
621
623
|
* @returns {Promise<DashboardResponse>}
|
|
622
624
|
*/
|
|
623
|
-
async getDashboard() {
|
|
624
|
-
|
|
625
|
+
async getDashboard(month) {
|
|
626
|
+
const params = {};
|
|
627
|
+
if (month !== undefined) params.month = month;
|
|
628
|
+
return await this.client.get("/api/v1/admin/dashboard/", { params });
|
|
625
629
|
}
|
|
626
630
|
|
|
627
631
|
/**
|