nazar-salary 3.4.9 → 3.5.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 +9 -1
- package/index.js +7 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1719,8 +1719,16 @@ declare module 'nazar-salary' {
|
|
|
1719
1719
|
deduction: TeamSalaryDeduction;
|
|
1720
1720
|
}
|
|
1721
1721
|
|
|
1722
|
+
export interface TeamSalaryDeductionsParams {
|
|
1723
|
+
/** Page number (default 1) */
|
|
1724
|
+
page?: number;
|
|
1725
|
+
/** Items per page (default 20, max 100) */
|
|
1726
|
+
limit?: number;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1722
1729
|
export interface TeamSalaryDeductionsResponse {
|
|
1723
1730
|
deductions: TeamSalaryDeduction[];
|
|
1731
|
+
pagination: Pagination;
|
|
1724
1732
|
}
|
|
1725
1733
|
|
|
1726
1734
|
export default class SalaryAPI {
|
|
@@ -1825,7 +1833,7 @@ declare module 'nazar-salary' {
|
|
|
1825
1833
|
getTeamSalaryTotal(): Promise<TeamSalaryTotal>;
|
|
1826
1834
|
deleteTeamSalaryPrice(priceId: number): Promise<void>;
|
|
1827
1835
|
addTeamSalaryDeduction(data: AddTeamSalaryDeductionData): Promise<TeamSalaryDeductionResponse>;
|
|
1828
|
-
getTeamSalaryDeductions(): Promise<TeamSalaryDeductionsResponse>;
|
|
1836
|
+
getTeamSalaryDeductions(params?: TeamSalaryDeductionsParams): Promise<TeamSalaryDeductionsResponse>;
|
|
1829
1837
|
deleteTeamSalaryDeduction(id: number): Promise<void>;
|
|
1830
1838
|
|
|
1831
1839
|
// Refund endpoints
|
package/index.js
CHANGED
|
@@ -1000,11 +1000,14 @@ class SalaryAPI {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
1002
|
/**
|
|
1003
|
-
* Get list of
|
|
1004
|
-
* @
|
|
1003
|
+
* Get paginated list of team salary deductions (Admin only)
|
|
1004
|
+
* @param {object} [params] - Query parameters
|
|
1005
|
+
* @param {number} [params.page=1] - Page number
|
|
1006
|
+
* @param {number} [params.limit=20] - Items per page (max 100)
|
|
1007
|
+
* @returns {Promise<{deductions: array, pagination: object}>}
|
|
1005
1008
|
*/
|
|
1006
|
-
async getTeamSalaryDeductions() {
|
|
1007
|
-
return await this.client.get("/api/v1/admin/team_salary/deductions");
|
|
1009
|
+
async getTeamSalaryDeductions(params = {}) {
|
|
1010
|
+
return await this.client.get("/api/v1/admin/team_salary/deductions", { params });
|
|
1008
1011
|
}
|
|
1009
1012
|
|
|
1010
1013
|
/**
|