pha-hermes 1.13.0 → 1.13.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/api/liphe1.0/auth/authClient.d.ts +13 -0
- package/dist/api/liphe1.0/practitioner/practitionerClient.d.ts +13 -0
- package/dist/api/lipheApiClient.d.ts +13 -0
- package/dist/api/timesheet/timesheetClient.d.ts +24 -4
- package/dist/index.d.ts +3 -0
- package/dist/pha-hermes.cjs.development.js +311 -145
- package/dist/pha-hermes.cjs.development.js.map +1 -1
- package/dist/pha-hermes.cjs.production.min.js +1 -1
- package/dist/pha-hermes.cjs.production.min.js.map +1 -1
- package/dist/pha-hermes.esm.js +309 -146
- package/dist/pha-hermes.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/api/liphe1.0/auth/authClient.ts +76 -0
- package/src/api/liphe1.0/practitioner/practitionerClient.ts +49 -0
- package/src/api/lipheApiClient.ts +38 -0
- package/src/api/timesheet/timesheetClient.ts +54 -50
- package/src/index.ts +3 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
export declare class LipheAuthenticator {
|
|
3
|
+
axiosTokenInstance: AxiosInstance;
|
|
4
|
+
authenticatedAxiosInstance: AxiosInstance;
|
|
5
|
+
token: string | undefined;
|
|
6
|
+
private tokenRefreshPromise;
|
|
7
|
+
private email;
|
|
8
|
+
private password;
|
|
9
|
+
private type;
|
|
10
|
+
constructor(authenticatedAxiosInstance: AxiosInstance, baseUrl: string, email: string, password: string, type?: string);
|
|
11
|
+
initializeAuth(): Promise<void>;
|
|
12
|
+
private login;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AxiosInstance } from 'axios';
|
|
2
|
+
export interface LiphePractitioner {
|
|
3
|
+
id: number;
|
|
4
|
+
firstname: string;
|
|
5
|
+
lastname: string;
|
|
6
|
+
email: string;
|
|
7
|
+
communicationMode?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class LiphePractitionerClient {
|
|
10
|
+
private axios;
|
|
11
|
+
constructor(axiosInstance: AxiosInstance);
|
|
12
|
+
fetchAllPractitioners(agencyId?: number): Promise<LiphePractitioner[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { LiphePractitionerClient } from './liphe1.0/practitioner/practitionerClient';
|
|
3
|
+
export declare class LipheApiClient {
|
|
4
|
+
private instance;
|
|
5
|
+
private axiosInstance;
|
|
6
|
+
private authenticator;
|
|
7
|
+
practitionerClient: LiphePractitionerClient;
|
|
8
|
+
constructor(baseUrl: string, email: string, password: string, type?: string);
|
|
9
|
+
init(): Promise<void>;
|
|
10
|
+
setInstance(instance: LipheApiClient): void;
|
|
11
|
+
getInstance(): LipheApiClient;
|
|
12
|
+
getAxiosInstance(): AxiosInstance;
|
|
13
|
+
}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { AxiosInstance } from 'axios';
|
|
3
3
|
import { TimesheetDayEntry } from '../../models';
|
|
4
|
+
interface SFTimesheetHourField {
|
|
5
|
+
Id: string;
|
|
6
|
+
Date__c: Date;
|
|
7
|
+
Callback__c: number;
|
|
8
|
+
HoursEBAdjusted__c: number;
|
|
9
|
+
Misc__c: number;
|
|
10
|
+
OT1__c: number;
|
|
11
|
+
OT2__c: number;
|
|
12
|
+
OnCall__c: number;
|
|
13
|
+
Misc1__c: number;
|
|
14
|
+
Misc_1_Hours__c: number;
|
|
15
|
+
Misc_2_Hours__c: number;
|
|
16
|
+
Misc_3_Hours__c: number;
|
|
17
|
+
Misc_4_Hours__c: number;
|
|
18
|
+
Stat1__c: number;
|
|
19
|
+
Stat2__c: number;
|
|
20
|
+
In_Charge__c: number;
|
|
21
|
+
Shift_Travel_Stipend__c: number;
|
|
22
|
+
LastModifiedDate: Date;
|
|
23
|
+
}
|
|
24
|
+
declare type SFTimesheetHourFieldKeys = (keyof SFTimesheetHourField)[];
|
|
4
25
|
export declare class SFTimesheetClient {
|
|
5
26
|
private axiosInstance;
|
|
6
27
|
constructor(axiosInstance: AxiosInstance);
|
|
7
28
|
updateTimesheetHour(timesheetHourId: string, timesheet: TimesheetDayEntry): Promise<void>;
|
|
8
|
-
|
|
29
|
+
getTimesheetIds(workorderId: string, periodStartDate?: Date, periodEndDate?: Date): Promise<string[]>;
|
|
9
30
|
getTimesheetsForPractitioner(personnelID: string): Promise<any[]>;
|
|
10
|
-
|
|
11
|
-
getTimesheetHoursId(workorderId: string, timesheetDate: Date): Promise<string[]>;
|
|
12
|
-
getTimesheetHours(workorderId: string): Promise<TimesheetDayEntry[]>;
|
|
31
|
+
getTimesheetHours(workorderId: string, fields?: SFTimesheetHourFieldKeys[], periodStartDate?: Date, periodEndDate?: Date): Promise<TimesheetDayEntry[]>;
|
|
13
32
|
getPayPeriods(): Promise<any>;
|
|
14
33
|
uploadImageToTimesheet(file: Buffer, filename: string, timesheetId: string): Promise<void>;
|
|
15
34
|
}
|
|
35
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,3 +3,6 @@ export { SFPractitionerClient } from './api/practitioner/practitionerClient';
|
|
|
3
3
|
export { SFTimesheetClient } from './api/timesheet/timesheetClient';
|
|
4
4
|
export { SFAuthenticator } from './api/auth/auth';
|
|
5
5
|
export { Practitioner, Role, TimesheetDayEntry, Workorder } from './models';
|
|
6
|
+
export { LipheApiClient } from './api/lipheApiClient';
|
|
7
|
+
export { LipheAuthenticator } from './api/liphe1.0/auth/authClient';
|
|
8
|
+
export { LiphePractitionerClient } from './api/liphe1.0/practitioner/practitionerClient';
|