@brownandroot/api 0.3.0 → 0.4.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/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export declare class ApiHubClient {
|
|
|
55
55
|
searchByName(name: string): Promise<Employee[]>;
|
|
56
56
|
/** Get all employees reporting to a supervisor */
|
|
57
57
|
getBySupervisor(supervisorId: number): Promise<Employee[]>;
|
|
58
|
+
/** Search employees by email (case-insensitive partial match) */
|
|
59
|
+
searchByEmail(email: string): Promise<Employee[]>;
|
|
58
60
|
/** Get the supervisor chain above an employee */
|
|
59
61
|
getSupervisorChain(employeeId: number): Promise<Employee[]>;
|
|
60
62
|
}
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,10 @@ export class ApiHubClient {
|
|
|
31
31
|
async getBySupervisor(supervisorId) {
|
|
32
32
|
return this.request(`/employees/by-supervisor/${supervisorId}`);
|
|
33
33
|
}
|
|
34
|
+
/** Search employees by email (case-insensitive partial match) */
|
|
35
|
+
async searchByEmail(email) {
|
|
36
|
+
return this.request(`/employees/search?email=${encodeURIComponent(email)}`);
|
|
37
|
+
}
|
|
34
38
|
/** Get the supervisor chain above an employee */
|
|
35
39
|
async getSupervisorChain(employeeId) {
|
|
36
40
|
return this.request(`/employees/${employeeId}/supervisor-chain`);
|