@smartsides/oracle-ebs-sdk 1.0.6 → 1.0.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/README.md +280 -15
- package/dist/{OracleEBSClient-BE9XZUi1.d.mts → OracleEBSClient-BDnxW4cW.d.mts} +257 -16
- package/dist/{OracleEBSClient-BE9XZUi1.d.ts → OracleEBSClient-BDnxW4cW.d.ts} +257 -16
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +392 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +370 -32
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +171 -31
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +171 -31
- package/dist/server/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client/config.ts","../src/errors/index.ts","../src/client/BaseClient.ts","../src/modules/AuthModule.ts","../src/modules/LeavesModule.ts","../src/modules/SitRequestsModule.ts","../src/modules/NotificationsModule.ts","../src/modules/PayslipModule.ts","../src/modules/EmployeeModule.ts","../src/modules/AccrualBalancesModule.ts","../src/modules/FormsModule.ts","../src/modules/HealthModule.ts","../src/client/OracleEBSClient.ts"],"names":[],"mappings":";;;;;AAyCO,IAAM,aAAA,GAA0C;AAAA,EACnD,OAAA,EAAS,GAAA;AAAA,EACT,OAAA,EAAS,CAAA;AAAA,EACT,UAAA,EAAY,GAAA;AAAA,EACZ,KAAA,EAAO;AAAA,IACH,OAAA,EAAS,IAAA;AAAA,IACT,GAAA,EAAK;AAAA,GACT;AAAA,EACA,OAAA,EAAS;AAAA,IACL,OAAA,EAAS,KAAA;AAAA,IACT,KAAA,EAAO;AAAA;AAEf,CAAA;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,CAAA;AACvC,IAAA,IAAA,CAAK,OAAA,CAAQ,QAAA,CAAS,KAAA,EAAO,IAAI,CAAA;AACjC,IAAA,IAAA,CAAK,QAAA,CAAS,QAAA,CAAS,KAAA,EAAO,IAAI,CAAA;AAClC,IAAA,IAAA,CAAK,eAAA,CAAgB,QAAA,CAAS,KAAA,EAAO,IAAI,CAAA;AACzC,IAAA,IAAA,CAAK,KAAA,CAAM,QAAA,CAAS,KAAA,EAAO,IAAI,CAAA;AAC/B,IAAA,IAAA,CAAK,MAAA,CAAO,QAAA,CAAS,KAAA,EAAO,IAAI,CAAA;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAKA,UAAA,GAAmB;AACf,IAAA,IAAA,CAAK,KAAK,UAAA,EAAW;AACrB,IAAA,IAAA,CAAK,OAAO,UAAA,EAAW;AACvB,IAAA,IAAA,CAAK,YAAY,UAAA,EAAW;AAC5B,IAAA,IAAA,CAAK,cAAc,UAAA,EAAW;AAC9B,IAAA,IAAA,CAAK,QAAQ,UAAA,EAAW;AACxB,IAAA,IAAA,CAAK,SAAS,UAAA,EAAW;AACzB,IAAA,IAAA,CAAK,gBAAgB,UAAA,EAAW;AAChC,IAAA,IAAA,CAAK,MAAM,UAAA,EAAW;AACtB,IAAA,IAAA,CAAK,OAAO,UAAA,EAAW;AAAA,EAC3B;AACJ","file":"index.mjs","sourcesContent":["/**\n * SDK Configuration\n */\nexport interface OracleEBSConfig {\n /** Base URL of the API */\n baseUrl: string;\n\n /** JWT token for authentication */\n token?: string;\n\n /** Request timeout in milliseconds */\n timeout?: number;\n\n /** Number of retries for failed requests */\n retries?: number;\n\n /** Retry delay in milliseconds */\n retryDelay?: number;\n\n /** Cache configuration */\n cache?: {\n enabled?: boolean;\n ttl?: number; // seconds\n };\n\n /** Logging configuration */\n logging?: {\n enabled?: boolean;\n level?: 'debug' | 'info' | 'warn' | 'error';\n };\n\n /** Custom error handler */\n onError?: (error: Error) => void;\n\n /** Custom request interceptor */\n onRequest?: (request: Request) => Request | Promise<Request>;\n\n /** Custom response interceptor */\n onResponse?: (response: Response) => Response | Promise<Response>;\n}\n\nexport const defaultConfig: Partial<OracleEBSConfig> = {\n timeout: 30000,\n retries: 3,\n retryDelay: 1000,\n cache: {\n enabled: true,\n ttl: 300,\n },\n logging: {\n enabled: false,\n level: 'info',\n },\n};\n","/**\n * Base API Error class\n */\nexport class APIError extends Error {\n public readonly statusCode: number;\n public readonly code: string;\n public readonly details?: any;\n\n constructor(message: string, statusCode: number, code: string, details?: any) {\n super(message);\n this.name = 'APIError';\n this.statusCode = statusCode;\n this.code = code;\n this.details = details;\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Validation Error (400)\n */\nexport class ValidationError extends APIError {\n public readonly fields?: Record<string, string[]>;\n\n constructor(message: string, fields?: Record<string, string[]>, details?: any) {\n super(message, 400, 'VALIDATION_ERROR', details);\n this.name = 'ValidationError';\n this.fields = fields;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Unauthorized Error (401)\n */\nexport class UnauthorizedError extends APIError {\n constructor(message: string = 'Unauthorized', details?: any) {\n super(message, 401, 'UNAUTHORIZED', details);\n this.name = 'UnauthorizedError';\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n\n/**\n * Forbidden Error (403)\n */\nexport class ForbiddenError extends APIError {\n constructor(message: string = 'Forbidden', details?: any) {\n super(message, 403, 'FORBIDDEN', details);\n this.name = 'ForbiddenError';\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n\n/**\n * Not Found Error (404)\n */\nexport class NotFoundError extends APIError {\n constructor(message: string = 'Resource not found', details?: any) {\n super(message, 404, 'NOT_FOUND', details);\n this.name = 'NotFoundError';\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n\n/**\n * Network Error\n */\nexport class NetworkError extends APIError {\n constructor(message: string = 'Network error occurred', details?: any) {\n super(message, 0, 'NETWORK_ERROR', details);\n this.name = 'NetworkError';\n Object.setPrototypeOf(this, NetworkError.prototype);\n }\n}\n\n/**\n * Timeout Error (408)\n */\nexport class TimeoutError extends APIError {\n constructor(message: string = 'Request timeout', details?: any) {\n super(message, 408, 'TIMEOUT', details);\n this.name = 'TimeoutError';\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Server Error (500+)\n */\nexport class ServerError extends APIError {\n constructor(message: string = 'Internal server error', statusCode: number = 500, details?: any) {\n super(message, statusCode, 'SERVER_ERROR', details);\n this.name = 'ServerError';\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import ky, { type KyInstance, type Options } from 'ky';\nimport type { OracleEBSConfig } from './config';\nimport { defaultConfig } from './config';\nimport {\n APIError,\n ValidationError,\n UnauthorizedError,\n ForbiddenError,\n NotFoundError,\n NetworkError,\n TimeoutError,\n ServerError,\n} from '../errors';\nimport type { APIResponse } from '../types/common';\n\nexport class BaseClient {\n protected client: KyInstance;\n protected config: OracleEBSConfig;\n protected token?: string;\n protected user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n };\n\n constructor(config: OracleEBSConfig) {\n this.config = { ...defaultConfig, ...config };\n this.token = config.token;\n\n this.client = ky.create({\n prefixUrl: this.config.baseUrl,\n timeout: this.config.timeout,\n retry: {\n limit: this.config.retries || 0,\n methods: ['get', 'post', 'put', 'delete'],\n statusCodes: [408, 413, 429, 500, 502, 503, 504],\n },\n hooks: {\n beforeRequest: [\n (request) => {\n // Add authorization header\n if (this.token) {\n request.headers.set('Authorization', `Bearer ${this.token}`);\n }\n\n // Add content type\n if (!request.headers.has('Content-Type')) {\n request.headers.set('Content-Type', 'application/json');\n }\n\n // Custom request interceptor\n if (this.config.onRequest) {\n return this.config.onRequest(request);\n }\n\n return request;\n },\n ],\n beforeRetry: [\n ({ request, retryCount }) => {\n this.log('warn', `Retrying request (${retryCount}):`, request.url);\n },\n ],\n afterResponse: [\n async (_request, _options, response) => {\n // Custom response interceptor\n if (this.config.onResponse) {\n return this.config.onResponse(response);\n }\n return response;\n },\n ],\n },\n });\n }\n\n /**\n * Set authentication token\n */\n setToken(token: string, user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n }): void {\n this.token = token;\n this.user = user;\n }\n\n /**\n * Clear authentication token\n */\n clearToken(): void {\n this.token = undefined;\n this.user = undefined;\n }\n\n /**\n * Get current authentication token\n */\n protected getToken(): string | null {\n return this.token || null;\n }\n\n /**\n * Get stored user object\n */\n protected getUser() {\n return this.user;\n }\n\n /**\n * Get employee number from stored user\n */\n protected getEmployeeNumber(): string | null {\n return this.user?.EMPLOYEE_NUMBER || null;\n }\n\n /**\n * Make a GET request\n */\n protected async get<T>(url: string, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `GET ${url}`);\n const response = await this.client.get(url, options).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a POST request\n */\n protected async post<T>(url: string, data?: any, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `POST ${url}`);\n const response = await this.client.post(url, { json: data, ...options }).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a PUT request\n */\n protected async put<T>(url: string, data?: any, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `PUT ${url}`);\n const response = await this.client.put(url, { json: data, ...options }).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a DELETE request\n */\n protected async delete<T>(url: string, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `DELETE ${url}`);\n const response = await this.client.delete(url, options).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Handle API errors\n */\n protected handleError(error: any): Error {\n // Only log if logging is enabled\n if (this.config.logging?.enabled) {\n this.log('error', 'API Error:', error);\n }\n\n // Network errors\n if (error.name === 'TypeError' || error.message?.includes('fetch')) {\n const networkError = new NetworkError('Network error occurred', error);\n this.config.onError?.(networkError);\n return networkError;\n }\n\n // Timeout errors\n if (error.name === 'TimeoutError') {\n const timeoutError = new TimeoutError('Request timeout', error);\n this.config.onError?.(timeoutError);\n return timeoutError;\n }\n\n // HTTP errors\n if (error.response) {\n const status = error.response.status;\n const message = error.response.statusText || 'An error occurred';\n\n let apiError: APIError;\n\n switch (status) {\n case 400:\n apiError = new ValidationError(message);\n break;\n case 401:\n apiError = new UnauthorizedError(message);\n break;\n case 403:\n apiError = new ForbiddenError(message);\n break;\n case 404:\n apiError = new NotFoundError(message);\n break;\n case 408:\n apiError = new TimeoutError(message);\n break;\n case 500:\n case 502:\n case 503:\n case 504:\n apiError = new ServerError(message, status);\n break;\n default:\n apiError = new APIError(message, status, 'API_ERROR');\n }\n\n this.config.onError?.(apiError);\n return apiError;\n }\n\n // Unknown error\n const unknownError = new APIError(\n error.message || 'An unknown error occurred',\n 0,\n 'UNKNOWN_ERROR'\n );\n this.config.onError?.(unknownError);\n return unknownError;\n }\n\n /**\n * Log messages\n */\n protected log(level: 'debug' | 'info' | 'warn' | 'error', ...args: any[]): void {\n if (!this.config.logging?.enabled) return;\n\n const configLevel = this.config.logging.level || 'info';\n const levels = ['debug', 'info', 'warn', 'error'];\n const currentLevelIndex = levels.indexOf(level);\n const configLevelIndex = levels.indexOf(configLevel);\n\n if (currentLevelIndex >= configLevelIndex) {\n console[level]('[OracleEBS SDK]', ...args);\n }\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n LoginCredentials,\n LoginResponse,\n UserContext,\n} from '../types/auth';\n\nexport class AuthModule extends BaseClient {\n /**\n * Login with username and password\n */\n async login(credentials: LoginCredentials): Promise<LoginResponse> {\n const response = await this.post<LoginResponse>('auth/login', credentials);\n\n // Automatically set token and user object after successful login\n if (response.data?.access_token) {\n this.setToken(response.data.access_token, response.data.user);\n }\n\n return response.data!;\n }\n\n /**\n * Logout (clear token)\n */\n async logout(): Promise<void> {\n this.clearToken();\n }\n\n /**\n * Get user context\n */\n async getUserContext(): Promise<UserContext> {\n const response = await this.get<UserContext>('user-context');\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetAbsenceTypesParams,\n GetAbsenceTypesResponse,\n GetLeaveHistoryResponse,\n CreateLeaveRequestInput,\n CreateLeaveRequestResponse,\n} from '../types/leaves';\n\nexport class LeavesModule extends BaseClient {\n /**\n * Get restricted absence types for the authenticated user\n */\n async getRestrictedTypes(params?: GetAbsenceTypesParams): Promise<GetAbsenceTypesResponse> {\n const searchParams = new URLSearchParams();\n if (params?.effectiveDate) {\n searchParams.set('effectiveDate', params.effectiveDate);\n }\n\n const url = `leaves/restricted-absence-types${searchParams.toString() ? `?${searchParams}` : ''}`;\n const response = await this.get<GetAbsenceTypesResponse>(url);\n return response.data!;\n }\n\n /**\n * Get combined leave history for the authenticated user\n */\n async getHistory(): Promise<GetLeaveHistoryResponse> {\n const response = await this.get<GetLeaveHistoryResponse>('leaves/combined-leave-history');\n return response.data!;\n }\n\n /**\n * Create a new leave request\n */\n async createRequest(input: CreateLeaveRequestInput): Promise<CreateLeaveRequestResponse> {\n const response = await this.post<CreateLeaveRequestResponse>('leaves/requests', input);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetSitSegmentsParams,\n GetSitSegmentsResponse,\n SaveAndPreviewSitRequestInput,\n SaveAndPreviewSitRequestResponse,\n SubmitSitRequestInput,\n SubmitSitRequestResponse,\n GetSitHistoryParams,\n GetSitHistoryResponse,\n} from '../types/sit-requests';\n\nexport class SitRequestsModule extends BaseClient {\n /**\n * Get SIT segments for form configuration\n */\n async getSegments(params: GetSitSegmentsParams): Promise<GetSitSegmentsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('idFlexNum', params.idFlexNum);\n\n const response = await this.get<GetSitSegmentsResponse>(`sit-requests/segments?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Save and preview SIT request\n */\n async saveAndPreview(input: SaveAndPreviewSitRequestInput): Promise<SaveAndPreviewSitRequestResponse> {\n const response = await this.post<SaveAndPreviewSitRequestResponse>('sit-requests/save-and-preview', input);\n return response.data!;\n }\n\n /**\n * Submit SIT request\n */\n async submit(input: SubmitSitRequestInput): Promise<SubmitSitRequestResponse> {\n const response = await this.post<SubmitSitRequestResponse>('sit-requests/submit', input);\n return response.data!;\n }\n\n /**\n * Get SIT request history\n */\n async getHistory(params?: GetSitHistoryParams): Promise<GetSitHistoryResponse> {\n const searchParams = new URLSearchParams();\n if (params?.startDate) searchParams.set('startDate', params.startDate);\n if (params?.endDate) searchParams.set('endDate', params.endDate);\n\n const url = `sit-requests/history${searchParams.toString() ? `?${searchParams}` : ''}`;\n const response = await this.get<GetSitHistoryResponse>(url);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetNotificationsResponse,\n GetNotificationDetailsParams,\n NotificationDetails,\n ProcessApprovalInput,\n ProcessApprovalResponse,\n CloseFyiParams,\n CloseFyiResponse,\n} from '../types/notifications';\n\nexport class NotificationsModule extends BaseClient {\n /**\n * Get notification list for the authenticated user\n */\n async getList(): Promise<GetNotificationsResponse> {\n const response = await this.get<GetNotificationsResponse>('notifications/list');\n return response.data!;\n }\n\n /**\n * Get notification details\n */\n async getDetails(params: GetNotificationDetailsParams): Promise<NotificationDetails> {\n const searchParams = new URLSearchParams();\n searchParams.set('notificationId', params.notificationId);\n\n const response = await this.get<NotificationDetails>(`notifications/details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Process approval action (approve/reject)\n */\n async processApproval(input: ProcessApprovalInput): Promise<ProcessApprovalResponse> {\n const response = await this.post<ProcessApprovalResponse>('notifications/process-approval', input);\n return response.data!;\n }\n\n /**\n * Close FYI notification\n */\n async closeFyi(params: CloseFyiParams): Promise<CloseFyiResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('notificationId', params.notificationId);\n\n const response = await this.get<CloseFyiResponse>(`notifications/close-fyi?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetPayslipHeaderParams,\n PayslipHeader,\n GetPayslipDetailsParams,\n GetPayslipDetailsResponse,\n GetPayslipLeaveDetailsParams,\n GetPayslipLeaveDetailsResponse,\n GetPayslipRunBalancesParams,\n GetPayslipRunBalancesResponse,\n} from '../types/payslip';\n\nexport class PayslipModule extends BaseClient {\n /**\n * Get employee number from stored user context\n */\n private getEmployeeNumberFromContext(providedEmployeeNumber?: string): string {\n if (providedEmployeeNumber) {\n return providedEmployeeNumber;\n }\n\n const employeeNumber = this.getEmployeeNumber();\n if (!employeeNumber) {\n throw new Error('Employee number not available. Please login first.');\n }\n\n return employeeNumber;\n }\n\n /**\n * Get payslip header\n */\n async getHeader(params: GetPayslipHeaderParams): Promise<PayslipHeader> {\n const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);\n\n const searchParams = new URLSearchParams();\n searchParams.set('employeeNumber', employeeNumber);\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<PayslipHeader>(`payslip/header?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip details\n */\n async getDetails(params: GetPayslipDetailsParams): Promise<GetPayslipDetailsResponse> {\n const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);\n\n const searchParams = new URLSearchParams();\n searchParams.set('employeeNumber', employeeNumber);\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipDetailsResponse>(`payslip/details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip leave details\n */\n async getLeaveDetails(params: GetPayslipLeaveDetailsParams): Promise<GetPayslipLeaveDetailsResponse> {\n const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);\n\n const searchParams = new URLSearchParams();\n searchParams.set('employeeNumber', employeeNumber);\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipLeaveDetailsResponse>(`payslip/leave-details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip run balances\n */\n async getRunBalances(params: GetPayslipRunBalancesParams): Promise<GetPayslipRunBalancesResponse> {\n const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);\n\n const searchParams = new URLSearchParams();\n searchParams.set('employeeNumber', employeeNumber);\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipRunBalancesResponse>(`payslip/run-balances?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n PersonalInformation,\n GetEmployeeHierarchyResponse,\n} from '../types/employee';\n\nexport class EmployeeModule extends BaseClient {\n /**\n * Get personal information for the authenticated user\n */\n async getPersonalInfo(): Promise<PersonalInformation> {\n const response = await this.get<PersonalInformation>('personal-information/details');\n return response.data!;\n }\n\n /**\n * Get employee hierarchy\n */\n async getHierarchy(): Promise<GetEmployeeHierarchyResponse> {\n const response = await this.get<GetEmployeeHierarchyResponse>('employee-hierarchy');\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetAccrualBalancesParams,\n GetAccrualBalancesResponse,\n} from '../types/accrual-balances';\n\nexport class AccrualBalancesModule extends BaseClient {\n /**\n * Get accrual balances for the authenticated user\n */\n async getBalances(params: GetAccrualBalancesParams): Promise<GetAccrualBalancesResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('calculationDate', params.calculationDate);\n\n const response = await this.get<GetAccrualBalancesResponse>(`accrual-balances?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetTableColumnsParams,\n GetTableColumnsResponse,\n GetDffSegmentsParams,\n GetDffSegmentsResponse,\n} from '../types/forms';\n\nexport class FormsModule extends BaseClient {\n /**\n * Get table columns for form generation\n */\n async getTableColumns(params: GetTableColumnsParams): Promise<GetTableColumnsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('tableName', params.tableName);\n\n const response = await this.get<GetTableColumnsResponse>(`forms/table-columns?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get DFF segments for additional fields\n */\n async getDffSegments(params: GetDffSegmentsParams): Promise<GetDffSegmentsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('applicationId', params.applicationId);\n searchParams.set('flexfieldName', params.flexfieldName);\n\n const response = await this.get<GetDffSegmentsResponse>(`forms/dff-segments?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type { HealthCheckResponse } from '../types/health';\n\nexport class HealthModule extends BaseClient {\n /**\n * Check system health\n */\n async check(): Promise<HealthCheckResponse> {\n // Health endpoint doesn't use /api/v1 prefix\n const response = await this.client.get('../health').json<HealthCheckResponse>();\n return response;\n }\n\n /**\n * Simple ping to check if server is running\n */\n async ping(): Promise<string> {\n const response = await this.client.get('../').text();\n return response;\n }\n}\n","import type { OracleEBSConfig } from './config';\nimport { AuthModule } from '../modules/AuthModule';\nimport { LeavesModule } from '../modules/LeavesModule';\nimport { SitRequestsModule } from '../modules/SitRequestsModule';\nimport { NotificationsModule } from '../modules/NotificationsModule';\nimport { PayslipModule } from '../modules/PayslipModule';\nimport { EmployeeModule } from '../modules/EmployeeModule';\nimport { AccrualBalancesModule } from '../modules/AccrualBalancesModule';\nimport { FormsModule } from '../modules/FormsModule';\nimport { HealthModule } from '../modules/HealthModule';\n\n/**\n * Main Oracle EBS SDK Client\n * \n * @example\n * ```typescript\n * const client = new OracleEBSClient({\n * baseUrl: 'http://localhost:3000/api/v1',\n * logging: { enabled: true },\n * });\n * \n * // Login\n * await client.auth.login({ username, password });\n * \n * // Get leave types\n * const types = await client.leaves.getRestrictedTypes();\n * \n * // Create leave request\n * const request = await client.leaves.createRequest({\n * absenceTypeId: '71',\n * startDate: '2026-01-20',\n * endDate: '2026-01-22',\n * days: 3,\n * });\n * ```\n */\nexport class OracleEBSClient {\n public readonly auth: AuthModule;\n public readonly leaves: LeavesModule;\n public readonly sitRequests: SitRequestsModule;\n public readonly notifications: NotificationsModule;\n public readonly payslip: PayslipModule;\n public readonly employee: EmployeeModule;\n public readonly accrualBalances: AccrualBalancesModule;\n public readonly forms: FormsModule;\n public readonly health: HealthModule;\n\n constructor(config: OracleEBSConfig) {\n this.auth = new AuthModule(config);\n this.leaves = new LeavesModule(config);\n this.sitRequests = new SitRequestsModule(config);\n this.notifications = new NotificationsModule(config);\n this.payslip = new PayslipModule(config);\n this.employee = new EmployeeModule(config);\n this.accrualBalances = new AccrualBalancesModule(config);\n this.forms = new FormsModule(config);\n this.health = new HealthModule(config);\n }\n\n /**\n * Set authentication token for all modules\n */\n setToken(token: string, user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n }): void {\n this.auth.setToken(token, user);\n this.leaves.setToken(token, user);\n this.sitRequests.setToken(token, user);\n this.notifications.setToken(token, user);\n this.payslip.setToken(token, user);\n this.employee.setToken(token, user);\n this.accrualBalances.setToken(token, user);\n this.forms.setToken(token, user);\n this.health.setToken(token, user);\n }\n\n /**\n * Clear authentication token from all modules\n */\n clearToken(): void {\n this.auth.clearToken();\n this.leaves.clearToken();\n this.sitRequests.clearToken();\n this.notifications.clearToken();\n this.payslip.clearToken();\n this.employee.clearToken();\n this.accrualBalances.clearToken();\n this.forms.clearToken();\n this.health.clearToken();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/client/config.ts","../src/errors/index.ts","../src/client/BaseClient.ts","../src/modules/AuthModule.ts","../src/modules/LeavesModule.ts","../src/modules/SitRequestsModule.ts","../src/modules/NotificationsModule.ts","../src/modules/PayslipModule.ts","../src/modules/EmployeeModule.ts","../src/modules/AccrualBalancesModule.ts","../src/modules/FormsModule.ts","../src/modules/HealthModule.ts","../src/modules/AiModule.ts","../src/client/OracleEBSClient.ts","../src/types/ai.ts","../src/hooks/index.ts"],"names":["MessageRole","ActionType","UserIntent"],"mappings":";;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,CAAI,OAAO,eAAe,CAAA;AAAA,IAC9D,OAAA,EAAS,MAAM,MAAA,CAAO,eAAA,CAAgB,YAAY,MAAM,CAAA;AAAA,IACxD,GAAG;AAAA,GACN,CAAA;AACL;AAGO,SAAS,eAAA,CACZ,MAAA,EACA,MAAA,EACA,OAAA,EACF;AACE,EAAA,OAAO,QAAA,CAAS;AAAA,IACZ,QAAA,EAAU,SAAA,CAAU,KAAA,CAAM,YAAA,CAAa,OAAO,SAAS,CAAA;AAAA,IACvD,OAAA,EAAS,MAAM,MAAA,CAAO,KAAA,CAAM,gBAAgB,MAAM,CAAA;AAAA,IAClD,GAAG;AAAA,GACN,CAAA;AACL;AAEO,SAAS,cAAA,CACZ,MAAA,EACA,MAAA,EACA,OAAA,EACF;AACE,EAAA,OAAO,QAAA,CAAS;AAAA,IACZ,QAAA,EAAU,SAAA,CAAU,KAAA,CAAM,WAAA,CAAY,MAAM,CAAA;AAAA,IAC5C,OAAA,EAAS,MAAM,MAAA,CAAO,KAAA,CAAM,eAAe,MAAM,CAAA;AAAA,IACjD,GAAG;AAAA,GACN,CAAA;AACL;AAGO,SAAS,cAAA,CACZ,QACA,OAAA,EACF;AACE,EAAA,OAAO,QAAA,CAAS;AAAA,IACZ,QAAA,EAAU,UAAU,MAAA,CAAO,KAAA;AAAA,IAC3B,OAAA,EAAS,MAAM,MAAA,CAAO,MAAA,CAAO,KAAA,EAAM;AAAA,IACnC,GAAG;AAAA,GACN,CAAA;AACL","file":"index.mjs","sourcesContent":["/**\n * SDK Configuration\n */\nexport interface OracleEBSConfig {\n /** Base URL of the API */\n baseUrl: string;\n\n /** JWT token for authentication */\n token?: string;\n\n /** Request timeout in milliseconds */\n timeout?: number;\n\n /** Number of retries for failed requests */\n retries?: number;\n\n /** Retry delay in milliseconds */\n retryDelay?: number;\n\n /** Cache configuration */\n cache?: {\n enabled?: boolean;\n ttl?: number; // seconds\n };\n\n /** Logging configuration */\n logging?: {\n enabled?: boolean;\n level?: 'debug' | 'info' | 'warn' | 'error';\n };\n\n /** Custom error handler */\n onError?: (error: Error) => void;\n\n /** Custom request interceptor */\n onRequest?: (request: Request) => Request | Promise<Request>;\n\n /** Custom response interceptor */\n onResponse?: (response: Response) => Response | Promise<Response>;\n}\n\nexport const defaultConfig: Partial<OracleEBSConfig> = {\n timeout: 30000,\n retries: 3,\n retryDelay: 1000,\n cache: {\n enabled: true,\n ttl: 300,\n },\n logging: {\n enabled: false,\n level: 'info',\n },\n};\n","/**\n * Base API Error class\n */\nexport class APIError extends Error {\n public readonly statusCode: number;\n public readonly code: string;\n public readonly details?: any;\n\n constructor(message: string, statusCode: number, code: string, details?: any) {\n super(message);\n this.name = 'APIError';\n this.statusCode = statusCode;\n this.code = code;\n this.details = details;\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Validation Error (400)\n */\nexport class ValidationError extends APIError {\n public readonly fields?: Record<string, string[]>;\n\n constructor(message: string, fields?: Record<string, string[]>, details?: any) {\n super(message, 400, 'VALIDATION_ERROR', details);\n this.name = 'ValidationError';\n this.fields = fields;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Unauthorized Error (401)\n */\nexport class UnauthorizedError extends APIError {\n constructor(message: string = 'Unauthorized', details?: any) {\n super(message, 401, 'UNAUTHORIZED', details);\n this.name = 'UnauthorizedError';\n Object.setPrototypeOf(this, UnauthorizedError.prototype);\n }\n}\n\n/**\n * Forbidden Error (403)\n */\nexport class ForbiddenError extends APIError {\n constructor(message: string = 'Forbidden', details?: any) {\n super(message, 403, 'FORBIDDEN', details);\n this.name = 'ForbiddenError';\n Object.setPrototypeOf(this, ForbiddenError.prototype);\n }\n}\n\n/**\n * Not Found Error (404)\n */\nexport class NotFoundError extends APIError {\n constructor(message: string = 'Resource not found', details?: any) {\n super(message, 404, 'NOT_FOUND', details);\n this.name = 'NotFoundError';\n Object.setPrototypeOf(this, NotFoundError.prototype);\n }\n}\n\n/**\n * Network Error\n */\nexport class NetworkError extends APIError {\n constructor(message: string = 'Network error occurred', details?: any) {\n super(message, 0, 'NETWORK_ERROR', details);\n this.name = 'NetworkError';\n Object.setPrototypeOf(this, NetworkError.prototype);\n }\n}\n\n/**\n * Timeout Error (408)\n */\nexport class TimeoutError extends APIError {\n constructor(message: string = 'Request timeout', details?: any) {\n super(message, 408, 'TIMEOUT', details);\n this.name = 'TimeoutError';\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Server Error (500+)\n */\nexport class ServerError extends APIError {\n constructor(message: string = 'Internal server error', statusCode: number = 500, details?: any) {\n super(message, statusCode, 'SERVER_ERROR', details);\n this.name = 'ServerError';\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n","import ky, { type KyInstance, type Options } from 'ky';\nimport type { OracleEBSConfig } from './config';\nimport { defaultConfig } from './config';\nimport {\n APIError,\n ValidationError,\n UnauthorizedError,\n ForbiddenError,\n NotFoundError,\n NetworkError,\n TimeoutError,\n ServerError,\n} from '../errors';\nimport type { APIResponse } from '../types/common';\n\nexport class BaseClient {\n protected client: KyInstance;\n protected config: OracleEBSConfig;\n protected token?: string;\n protected user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n };\n\n constructor(config: OracleEBSConfig) {\n this.config = { ...defaultConfig, ...config };\n this.token = config.token;\n\n this.client = ky.create({\n prefixUrl: this.config.baseUrl,\n timeout: this.config.timeout,\n retry: {\n limit: this.config.retries || 0,\n methods: ['get', 'post', 'put', 'delete'],\n statusCodes: [408, 413, 429, 500, 502, 503, 504],\n },\n hooks: {\n beforeRequest: [\n (request) => {\n // Add authorization header\n if (this.token) {\n request.headers.set('Authorization', `Bearer ${this.token}`);\n }\n\n // Add content type\n if (!request.headers.has('Content-Type')) {\n request.headers.set('Content-Type', 'application/json');\n }\n\n // Custom request interceptor\n if (this.config.onRequest) {\n return this.config.onRequest(request);\n }\n\n return request;\n },\n ],\n beforeRetry: [\n ({ request, retryCount }) => {\n this.log('warn', `Retrying request (${retryCount}):`, request.url);\n },\n ],\n afterResponse: [\n async (_request, _options, response) => {\n // Custom response interceptor\n if (this.config.onResponse) {\n return this.config.onResponse(response);\n }\n return response;\n },\n ],\n },\n });\n }\n\n /**\n * Set authentication token\n */\n setToken(token: string, user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n }): void {\n this.token = token;\n this.user = user;\n }\n\n /**\n * Clear authentication token\n */\n clearToken(): void {\n this.token = undefined;\n this.user = undefined;\n }\n\n /**\n * Get current authentication token\n */\n protected getToken(): string | null {\n return this.token || null;\n }\n\n /**\n * Get stored user object\n */\n protected getUser() {\n return this.user;\n }\n\n /**\n * Get employee number from stored user\n */\n protected getEmployeeNumber(): string | null {\n return this.user?.EMPLOYEE_NUMBER || null;\n }\n\n /**\n * Make a GET request\n */\n protected async get<T>(url: string, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `GET ${url}`);\n const response = await this.client.get(url, options).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a POST request\n */\n protected async post<T>(url: string, data?: any, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `POST ${url}`);\n\n // Handle FormData differently (for file uploads)\n const requestOptions = data instanceof FormData\n ? { body: data, ...options }\n : { json: data, ...options };\n\n const response = await this.client.post(url, requestOptions).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a PUT request\n */\n protected async put<T>(url: string, data?: any, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `PUT ${url}`);\n const response = await this.client.put(url, { json: data, ...options }).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Make a DELETE request\n */\n protected async delete<T>(url: string, options?: Options): Promise<APIResponse<T>> {\n try {\n this.log('info', `DELETE ${url}`);\n const response = await this.client.delete(url, options).json<APIResponse<T>>();\n return response;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n\n /**\n * Handle API errors\n */\n protected handleError(error: any): Error {\n // Only log if logging is enabled\n if (this.config.logging?.enabled) {\n this.log('error', 'API Error:', error);\n }\n\n // Network errors\n if (error.name === 'TypeError' || error.message?.includes('fetch')) {\n const networkError = new NetworkError('Network error occurred', error);\n this.config.onError?.(networkError);\n return networkError;\n }\n\n // Timeout errors\n if (error.name === 'TimeoutError') {\n const timeoutError = new TimeoutError('Request timeout', error);\n this.config.onError?.(timeoutError);\n return timeoutError;\n }\n\n // HTTP errors\n if (error.response) {\n const status = error.response.status;\n const message = error.response.statusText || 'An error occurred';\n\n let apiError: APIError;\n\n switch (status) {\n case 400:\n apiError = new ValidationError(message);\n break;\n case 401:\n apiError = new UnauthorizedError(message);\n break;\n case 403:\n apiError = new ForbiddenError(message);\n break;\n case 404:\n apiError = new NotFoundError(message);\n break;\n case 408:\n apiError = new TimeoutError(message);\n break;\n case 500:\n case 502:\n case 503:\n case 504:\n apiError = new ServerError(message, status);\n break;\n default:\n apiError = new APIError(message, status, 'API_ERROR');\n }\n\n this.config.onError?.(apiError);\n return apiError;\n }\n\n // Unknown error\n const unknownError = new APIError(\n error.message || 'An unknown error occurred',\n 0,\n 'UNKNOWN_ERROR'\n );\n this.config.onError?.(unknownError);\n return unknownError;\n }\n\n /**\n * Log messages\n */\n protected log(level: 'debug' | 'info' | 'warn' | 'error', ...args: any[]): void {\n if (!this.config.logging?.enabled) return;\n\n const configLevel = this.config.logging.level || 'info';\n const levels = ['debug', 'info', 'warn', 'error'];\n const currentLevelIndex = levels.indexOf(level);\n const configLevelIndex = levels.indexOf(configLevel);\n\n if (currentLevelIndex >= configLevelIndex) {\n console[level]('[OracleEBS SDK]', ...args);\n }\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n LoginCredentials,\n LoginResponse,\n UserContext,\n} from '../types/auth';\n\nexport class AuthModule extends BaseClient {\n /**\n * Login with username and password\n */\n async login(credentials: LoginCredentials): Promise<LoginResponse> {\n const response = await this.post<LoginResponse>('auth/login', credentials);\n\n // Automatically set token and user object after successful login\n if (response.data?.access_token) {\n this.setToken(response.data.access_token, response.data.user);\n }\n\n return response.data!;\n }\n\n /**\n * Logout (clear token)\n */\n async logout(): Promise<void> {\n this.clearToken();\n }\n\n /**\n * Get user context\n */\n async getUserContext(): Promise<UserContext> {\n const response = await this.get<UserContext>('user-context');\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetAbsenceTypesParams,\n GetAbsenceTypesResponse,\n GetLeaveHistoryResponse,\n CreateLeaveRequestInput,\n CreateLeaveRequestResponse,\n} from '../types/leaves';\n\nexport class LeavesModule extends BaseClient {\n /**\n * Get restricted absence types for the authenticated user\n */\n async getRestrictedTypes(params?: GetAbsenceTypesParams): Promise<GetAbsenceTypesResponse> {\n const searchParams = new URLSearchParams();\n if (params?.effectiveDate) {\n searchParams.set('effectiveDate', params.effectiveDate);\n }\n\n const url = `leaves/restricted-absence-types${searchParams.toString() ? `?${searchParams}` : ''}`;\n const response = await this.get<GetAbsenceTypesResponse>(url);\n return response.data!;\n }\n\n /**\n * Get combined leave history for the authenticated user\n */\n async getHistory(): Promise<GetLeaveHistoryResponse> {\n const response = await this.get<GetLeaveHistoryResponse>('leaves/combined-leave-history');\n return response.data!;\n }\n\n /**\n * Create a new leave request\n */\n async createRequest(input: CreateLeaveRequestInput): Promise<CreateLeaveRequestResponse> {\n const response = await this.post<CreateLeaveRequestResponse>('leaves/requests', input);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetSitSegmentsParams,\n GetSitSegmentsResponse,\n SaveAndPreviewSitRequestInput,\n SaveAndPreviewSitRequestResponse,\n SubmitSitRequestInput,\n SubmitSitRequestResponse,\n GetSitHistoryParams,\n GetSitHistoryResponse,\n} from '../types/sit-requests';\n\nexport class SitRequestsModule extends BaseClient {\n /**\n * Get SIT segments for form configuration\n */\n async getSegments(params: GetSitSegmentsParams): Promise<GetSitSegmentsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('idFlexNum', params.idFlexNum);\n\n const response = await this.get<GetSitSegmentsResponse>(`sit-requests/segments?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Save and preview SIT request\n */\n async saveAndPreview(input: SaveAndPreviewSitRequestInput): Promise<SaveAndPreviewSitRequestResponse> {\n const response = await this.post<SaveAndPreviewSitRequestResponse>('sit-requests/save-and-preview', input);\n return response.data!;\n }\n\n /**\n * Submit SIT request\n */\n async submit(input: SubmitSitRequestInput): Promise<SubmitSitRequestResponse> {\n const response = await this.post<SubmitSitRequestResponse>('sit-requests/submit', input);\n return response.data!;\n }\n\n /**\n * Get SIT request history\n */\n async getHistory(params: GetSitHistoryParams): Promise<GetSitHistoryResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('sitName', params.sitName);\n if (params.transactionId) searchParams.set('transactionId', params.transactionId);\n if (params.startDate) searchParams.set('startDate', params.startDate);\n if (params.endDate) searchParams.set('endDate', params.endDate);\n\n const response = await this.get<GetSitHistoryResponse>(`sit-requests/history?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetNotificationsResponse,\n GetNotificationDetailsParams,\n NotificationDetails,\n GetAllDetailsParams,\n AllDetailsResponse,\n GetAbsenceDetailsParams,\n AbsenceDetailsResponse,\n GetActionHistoryParams,\n ActionHistoryResponse,\n ProcessApprovalInput,\n ProcessApprovalResponse,\n CloseFyiParams,\n CloseFyiResponse,\n} from '../types/notifications';\n\nexport class NotificationsModule extends BaseClient {\n /**\n * Get notification list for the authenticated user\n */\n async getList(): Promise<GetNotificationsResponse> {\n const response = await this.get<GetNotificationsResponse>('notifications/list');\n return response.data!;\n }\n\n /**\n * Get notification details\n */\n async getDetails(params: GetNotificationDetailsParams): Promise<NotificationDetails> {\n const searchParams = new URLSearchParams();\n searchParams.set('notificationId', params.notificationId);\n\n const response = await this.get<NotificationDetails>(`notifications/details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get all notification details (SSHR_SIT_REQDTLS)\n * All parameters are required\n */\n async getAllDetails(params: GetAllDetailsParams): Promise<AllDetailsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('notificationId', params.notificationId);\n searchParams.set('itemKey', params.itemKey);\n searchParams.set('analysisCriteriaId', params.analysisCriteriaId);\n searchParams.set('idFlexNum', params.idFlexNum);\n\n const response = await this.get<AllDetailsResponse>(`notifications/all-details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get absence details for FYI notifications\n */\n async getAbsenceDetails(params: GetAbsenceDetailsParams): Promise<AbsenceDetailsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('itemKey', params.itemKey);\n\n const response = await this.get<AbsenceDetailsResponse>(`notifications/absence-details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get action history for a notification\n */\n async getActionHistory(params: GetActionHistoryParams): Promise<ActionHistoryResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('notificationId', params.notificationId);\n\n const response = await this.get<ActionHistoryResponse>(`notifications/action-history?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Process approval action (APPROVE/DECLINE)\n */\n async processApproval(input: ProcessApprovalInput): Promise<ProcessApprovalResponse> {\n const response = await this.post<ProcessApprovalResponse>('notifications/process-approval-action', input);\n return response.data!;\n }\n\n /**\n * Close FYI notification\n */\n async closeFyi(params: CloseFyiParams): Promise<CloseFyiResponse> {\n const response = await this.post<CloseFyiResponse>('notifications/close-fyi', {\n notificationId: params.notificationId,\n });\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetPayslipHeaderParams,\n PayslipHeader,\n GetPayslipDetailsParams,\n GetPayslipDetailsResponse,\n GetPayslipLeaveDetailsParams,\n GetPayslipLeaveDetailsResponse,\n GetPayslipRunBalancesParams,\n GetPayslipRunBalancesResponse,\n} from '../types/payslip';\n\nexport class PayslipModule extends BaseClient {\n /**\n * Get payslip header\n * Note: employeeNumber is extracted from JWT by backend\n */\n async getHeader(params: GetPayslipHeaderParams): Promise<PayslipHeader> {\n const searchParams = new URLSearchParams();\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<PayslipHeader>(`payslip/header?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip details\n * Note: employeeNumber is extracted from JWT by backend\n */\n async getDetails(params: GetPayslipDetailsParams): Promise<GetPayslipDetailsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipDetailsResponse>(`payslip/details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip leave details\n * Note: employeeNumber is extracted from JWT by backend\n */\n async getLeaveDetails(params: GetPayslipLeaveDetailsParams): Promise<GetPayslipLeaveDetailsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipLeaveDetailsResponse>(`payslip/leave-details?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get payslip run balances\n * Note: employeeNumber is extracted from JWT by backend\n */\n async getRunBalances(params: GetPayslipRunBalancesParams): Promise<GetPayslipRunBalancesResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('periodName', params.periodName);\n\n const response = await this.get<GetPayslipRunBalancesResponse>(`payslip/run-balances?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n PersonalInformation,\n GetEmployeeHierarchyResponse,\n} from '../types/employee';\n\nexport class EmployeeModule extends BaseClient {\n /**\n * Get personal information for the authenticated user\n */\n async getPersonalInfo(): Promise<PersonalInformation> {\n const response = await this.get<PersonalInformation>('personal-information/details');\n return response.data!;\n }\n\n /**\n * Get employee hierarchy\n */\n async getHierarchy(): Promise<GetEmployeeHierarchyResponse> {\n const response = await this.get<GetEmployeeHierarchyResponse>('employee-hierarchy');\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetAccrualBalancesParams,\n GetAccrualBalancesResponse,\n} from '../types/accrual-balances';\n\nexport class AccrualBalancesModule extends BaseClient {\n /**\n * Get accrual balances for the authenticated user\n */\n async getBalances(params: GetAccrualBalancesParams): Promise<GetAccrualBalancesResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('calculationDate', params.calculationDate);\n\n const response = await this.get<GetAccrualBalancesResponse>(`accrual-balances?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n GetTableColumnsParams,\n GetTableColumnsResponse,\n GetDffSegmentsParams,\n GetDffSegmentsResponse,\n} from '../types/forms';\n\nexport class FormsModule extends BaseClient {\n /**\n * Get table columns for form generation\n */\n async getTableColumns(params: GetTableColumnsParams): Promise<GetTableColumnsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('tableName', params.tableName);\n\n const response = await this.get<GetTableColumnsResponse>(`forms/table-columns?${searchParams}`);\n return response.data!;\n }\n\n /**\n * Get DFF segments for additional fields\n */\n async getDffSegments(params: GetDffSegmentsParams): Promise<GetDffSegmentsResponse> {\n const searchParams = new URLSearchParams();\n searchParams.set('applicationId', params.applicationId);\n searchParams.set('flexfieldName', params.flexfieldName);\n\n const response = await this.get<GetDffSegmentsResponse>(`forms/dff-segments?${searchParams}`);\n return response.data!;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type { HealthCheckResponse } from '../types/health';\n\nexport class HealthModule extends BaseClient {\n /**\n * Check system health\n */\n async check(): Promise<HealthCheckResponse> {\n // Health endpoint doesn't use /api/v1 prefix\n const response = await this.client.get('../health').json<HealthCheckResponse>();\n return response;\n }\n\n /**\n * Simple ping to check if server is running\n */\n async ping(): Promise<string> {\n const response = await this.client.get('../').text();\n return response;\n }\n}\n","import { BaseClient } from '../client/BaseClient';\nimport type {\n ChatRequest,\n AiResponse,\n VoiceResponse,\n ChatMessage,\n ChatThread,\n GetThreadMessagesResponse,\n GetThreadsResponse,\n CreateThreadResponse,\n DeleteThreadResponse,\n} from '../types/ai';\n\n/**\n * AI Assistant Module\n * Provides methods for interacting with the AI assistant\n */\nexport class AiModule extends BaseClient {\n /**\n * Send a text message to the AI assistant\n * @param request Chat request with message and optional history\n * @returns AI response with message and CTAs\n */\n async sendMessage(request: ChatRequest): Promise<AiResponse> {\n const response = await this.post<AiResponse>('ai/chat', request);\n return response.data!;\n }\n\n /**\n * Send a voice message to the AI assistant\n * @param audioBlob Audio file as Blob\n * @param options Optional language and threadId for conversation continuity\n * @returns Transcription and AI response\n */\n async sendVoice(\n audioBlob: Blob,\n options?: { language?: 'en' | 'ar'; threadId?: string },\n ): Promise<VoiceResponse> {\n const formData = new FormData();\n formData.append('audio', audioBlob, 'voice-message.webm');\n if (options?.language) {\n formData.append('language', options.language);\n }\n if (options?.threadId) {\n formData.append('threadId', options.threadId);\n }\n\n const response = await this.post<VoiceResponse>('ai/voice', formData, {\n headers: {\n // Let browser set Content-Type with boundary for multipart/form-data\n },\n });\n return response.data!;\n }\n\n /**\n * Save chat message to local history\n * @param message Chat message to save\n */\n saveChatMessage(message: ChatMessage): void {\n try {\n const history = this.getLocalChatHistory();\n history.push({\n ...message,\n timestamp: new Date(),\n });\n\n // Keep only last 50 messages\n const trimmedHistory = history.slice(-50);\n\n if (typeof localStorage !== 'undefined') {\n localStorage.setItem(\n 'ai_chat_history',\n JSON.stringify(trimmedHistory),\n );\n }\n } catch (error) {\n console.error('Failed to save chat message:', error);\n }\n }\n\n /**\n * Get local chat history from localStorage\n * @returns Array of chat messages with timestamps\n */\n getLocalChatHistory(): Array<ChatMessage & { timestamp: Date }> {\n try {\n if (typeof localStorage === 'undefined') return [];\n\n const stored = localStorage.getItem('ai_chat_history');\n if (!stored) return [];\n\n const parsed = JSON.parse(stored);\n return parsed.map((msg: any) => ({\n ...msg,\n timestamp: new Date(msg.timestamp),\n }));\n } catch (error) {\n console.error('Failed to get chat history:', error);\n return [];\n }\n }\n\n /**\n * Clear local chat history\n */\n clearChatHistory(): void {\n try {\n if (typeof localStorage !== 'undefined') {\n localStorage.removeItem('ai_chat_history');\n }\n } catch (error) {\n console.error('Failed to clear chat history:', error);\n }\n }\n\n // ==================== Chat Thread Management ====================\n\n /**\n * Get all chat threads for the current user\n * @returns Array of chat threads\n */\n async getChatThreads(): Promise<ChatThread[]> {\n const response = await this.get<GetThreadsResponse>('ai/threads');\n return response.data!.threads;\n }\n\n /**\n * Get messages for a specific thread\n * @param threadId Thread ID\n * @returns Thread with messages\n */\n async getThreadMessages(threadId: string): Promise<GetThreadMessagesResponse> {\n const response = await this.get<GetThreadMessagesResponse>(`ai/threads/${threadId}/messages`);\n return response.data!;\n }\n\n /**\n * Create a new chat thread\n * @returns New thread\n */\n async createThread(): Promise<ChatThread> {\n const response = await this.post<CreateThreadResponse>('ai/threads', {});\n return response.data!.thread;\n }\n\n /**\n * Delete a chat thread\n * @param threadId Thread ID to delete\n */\n async deleteThread(threadId: string): Promise<void> {\n await this.delete<DeleteThreadResponse>(`ai/threads/${threadId}`);\n }\n}\n","import type { OracleEBSConfig } from './config';\nimport { AuthModule } from '../modules/AuthModule';\nimport { LeavesModule } from '../modules/LeavesModule';\nimport { SitRequestsModule } from '../modules/SitRequestsModule';\nimport { NotificationsModule } from '../modules/NotificationsModule';\nimport { PayslipModule } from '../modules/PayslipModule';\nimport { EmployeeModule } from '../modules/EmployeeModule';\nimport { AccrualBalancesModule } from '../modules/AccrualBalancesModule';\nimport { FormsModule } from '../modules/FormsModule';\nimport { HealthModule } from '../modules/HealthModule';\nimport { AiModule } from '../modules/AiModule';\n\n/**\n * Main Oracle EBS SDK Client\n * \n * @example\n * ```typescript\n * const client = new OracleEBSClient({\n * baseUrl: 'http://localhost:3000/api/v1',\n * logging: { enabled: true },\n * });\n * \n * // Login\n * await client.auth.login({ username, password });\n * \n * // Get leave types\n * const types = await client.leaves.getRestrictedTypes();\n * \n * // Create leave request\n * const request = await client.leaves.createRequest({\n * absenceTypeId: '71',\n * startDate: '2026-01-20',\n * endDate: '2026-01-22',\n * days: 3,\n * });\n * ```\n */\nexport class OracleEBSClient {\n public readonly auth: AuthModule;\n public readonly leaves: LeavesModule;\n public readonly sitRequests: SitRequestsModule;\n public readonly notifications: NotificationsModule;\n public readonly payslip: PayslipModule;\n public readonly employee: EmployeeModule;\n public readonly accrualBalances: AccrualBalancesModule;\n public readonly forms: FormsModule;\n public readonly health: HealthModule;\n public readonly ai: AiModule;\n\n constructor(config: OracleEBSConfig) {\n this.auth = new AuthModule(config);\n this.leaves = new LeavesModule(config);\n this.sitRequests = new SitRequestsModule(config);\n this.notifications = new NotificationsModule(config);\n this.payslip = new PayslipModule(config);\n this.employee = new EmployeeModule(config);\n this.accrualBalances = new AccrualBalancesModule(config);\n this.forms = new FormsModule(config);\n this.health = new HealthModule(config);\n this.ai = new AiModule(config);\n }\n\n /**\n * Set authentication token for all modules\n */\n setToken(token: string, user?: {\n userName?: string;\n ebsVersion?: string;\n USER_ID?: string;\n PERSON_ID?: string;\n EMPLOYEE_NUMBER?: string;\n responsibilities?: any[];\n }): void {\n this.auth.setToken(token, user);\n this.leaves.setToken(token, user);\n this.sitRequests.setToken(token, user);\n this.notifications.setToken(token, user);\n this.payslip.setToken(token, user);\n this.employee.setToken(token, user);\n this.accrualBalances.setToken(token, user);\n this.forms.setToken(token, user);\n this.health.setToken(token, user);\n this.ai.setToken(token, user);\n }\n\n /**\n * Clear authentication token from all modules\n */\n clearToken(): void {\n this.auth.clearToken();\n this.leaves.clearToken();\n this.sitRequests.clearToken();\n this.notifications.clearToken();\n this.payslip.clearToken();\n this.employee.clearToken();\n this.accrualBalances.clearToken();\n this.forms.clearToken();\n this.health.clearToken();\n this.ai.clearToken();\n }\n}\n","/**\n * AI Assistant Type Definitions\n * Types for AI chat, voice, and response handling\n */\n\nexport enum MessageRole {\n USER = 'user',\n ASSISTANT = 'assistant',\n SYSTEM = 'system',\n}\n\nexport enum ActionType {\n NAVIGATE = 'navigate',\n API_CALL = 'api_call',\n DOWNLOAD = 'download',\n CLOSE_NOTIFICATION = 'close_notification',\n SUBMIT_LEAVE = 'submit_leave',\n APPROVE_NOTIFICATION = 'approve_notification',\n DECLINE_NOTIFICATION = 'decline_notification',\n}\n\nexport enum UserIntent {\n NOTIFICATIONS_SUMMARY = 'notifications_summary',\n NOTIFICATION_CLOSE = 'notification_close',\n NOTIFICATION_ACTION = 'notification_action',\n PAYSLIP_QUERY = 'payslip_query',\n PAYSLIP_RETRIEVAL = 'payslip_retrieval',\n SALARY_DEDUCTION = 'salary_deduction',\n LEAVE_BALANCE = 'leave_balance',\n LEAVE_REQUEST = 'leave_request',\n PROFILE_INFO = 'profile_info',\n HIRING_DATE = 'hiring_date',\n POSITION_INFO = 'position_info',\n GENERAL_QUERY = 'general_query',\n OUT_OF_SCOPE = 'out_of_scope',\n}\n\nexport interface ChatMessage {\n role: MessageRole;\n content: string;\n}\n\nexport interface CallToAction {\n id: string;\n label: string;\n type: ActionType;\n params?: Record<string, any>;\n path?: string;\n icon?: string;\n variant?: 'default' | 'outline' | 'ghost' | 'destructive';\n}\n\nexport interface AiResponse {\n message: string;\n ctas?: CallToAction[];\n metadata?: {\n intent?: UserIntent;\n model?: string;\n tokensUsed?: number;\n [key: string]: any;\n };\n requiresAction?: boolean;\n chartData?: any;\n threadId?: string; // Added for thread support\n}\n\nexport interface ChatRequest {\n message: string;\n language?: 'en' | 'ar';\n history?: ChatMessage[];\n threadId?: string; // Added for thread support\n}\n\nexport interface VoiceTranscription {\n text: string;\n language: string;\n confidence?: number;\n duration?: number;\n}\n\nexport interface VoiceResponse {\n transcription: VoiceTranscription;\n response: AiResponse;\n}\n\nexport interface ChatHistory {\n id: string;\n messages: Array<ChatMessage & { timestamp: Date }>;\n createdAt: Date;\n updatedAt: Date;\n}\n\n// ==================== Chat Thread Types ====================\n\nexport interface ChatThread {\n id: string;\n userId: string;\n username: string;\n title: string | null;\n status: string;\n intent: string | null;\n createdAt: Date;\n updatedAt: Date;\n lastMessageAt: Date;\n messageCount: number;\n}\n\nexport interface ThreadMessage {\n id: string;\n threadId: string;\n role: 'user' | 'assistant';\n content: string;\n metadata?: {\n intent?: string;\n ctas?: CallToAction[];\n tokensUsed?: number;\n [key: string]: any;\n };\n createdAt: Date;\n}\n\nexport interface GetThreadMessagesResponse {\n thread: ChatThread;\n messages: ThreadMessage[];\n}\n\nexport interface GetThreadsResponse {\n threads: ChatThread[];\n}\n\nexport interface CreateThreadResponse {\n thread: ChatThread;\n}\n\nexport interface DeleteThreadResponse {\n success: boolean;\n message: string;\n}\n","/**\n * React Query hooks for Oracle EBS SDK\n * \n * @requires @tanstack/react-query\n * @requires react\n */\n\nimport { useQuery, useMutation, type UseQueryOptions, type UseMutationOptions } from '@tanstack/react-query';\nimport type { OracleEBSClient } from '../client/OracleEBSClient';\nimport type {\n LoginCredentials,\n LoginResponse,\n UserContext,\n GetAbsenceTypesParams,\n GetAbsenceTypesResponse,\n GetLeaveHistoryResponse,\n CreateLeaveRequestInput,\n CreateLeaveRequestResponse,\n GetSitSegmentsParams,\n GetSitSegmentsResponse,\n SaveAndPreviewSitRequestInput,\n SaveAndPreviewSitRequestResponse,\n SubmitSitRequestInput,\n SubmitSitRequestResponse,\n GetNotificationsResponse,\n GetNotificationDetailsParams,\n NotificationDetails,\n ProcessApprovalInput,\n ProcessApprovalResponse,\n GetPayslipHeaderParams,\n PayslipHeader,\n GetPayslipDetailsParams,\n GetPayslipDetailsResponse,\n PersonalInformation,\n GetEmployeeHierarchyResponse,\n GetAccrualBalancesParams,\n GetAccrualBalancesResponse,\n GetTableColumnsParams,\n GetTableColumnsResponse,\n GetDffSegmentsParams,\n GetDffSegmentsResponse,\n HealthCheckResponse,\n} from '../index';\n\n// Query keys\nexport const queryKeys = {\n auth: {\n userContext: ['auth', 'user-context'] as const,\n },\n leaves: {\n restrictedTypes: (params?: GetAbsenceTypesParams) => ['leaves', 'restricted-types', params] as const,\n history: ['leaves', 'history'] as const,\n },\n sitRequests: {\n segments: (params: GetSitSegmentsParams) => ['sit-requests', 'segments', params] as const,\n history: ['sit-requests', 'history'] as const,\n },\n notifications: {\n list: ['notifications', 'list'] as const,\n details: (notificationId: string) => ['notifications', 'details', notificationId] as const,\n },\n payslip: {\n header: (periodName: string) => ['payslip', 'header', periodName] as const,\n details: (periodName: string) => ['payslip', 'details', periodName] as const,\n },\n employee: {\n personalInfo: ['employee', 'personal-info'] as const,\n hierarchy: ['employee', 'hierarchy'] as const,\n },\n accrualBalances: {\n get: (calculationDate: string) => ['accrual-balances', calculationDate] as const,\n },\n forms: {\n tableColumns: (tableName: string) => ['forms', 'table-columns', tableName] as const,\n dffSegments: (params: GetDffSegmentsParams) => ['forms', 'dff-segments', params] as const,\n },\n health: {\n check: ['health', 'check'] as const,\n },\n};\n\n// Auth hooks\nexport function useLogin(\n client: OracleEBSClient,\n options?: UseMutationOptions<LoginResponse, Error, LoginCredentials>\n) {\n return useMutation({\n mutationFn: (credentials) => client.auth.login(credentials),\n ...options,\n });\n}\n\nexport function useUserContext(\n client: OracleEBSClient,\n options?: UseQueryOptions<UserContext, Error>\n) {\n return useQuery({\n queryKey: queryKeys.auth.userContext,\n queryFn: () => client.auth.getUserContext(),\n ...options,\n });\n}\n\n// Leaves hooks\nexport function useLeaveTypes(\n client: OracleEBSClient,\n params?: GetAbsenceTypesParams,\n options?: UseQueryOptions<GetAbsenceTypesResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.leaves.restrictedTypes(params),\n queryFn: () => client.leaves.getRestrictedTypes(params),\n ...options,\n });\n}\n\nexport function useLeaveHistory(\n client: OracleEBSClient,\n options?: UseQueryOptions<GetLeaveHistoryResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.leaves.history,\n queryFn: () => client.leaves.getHistory(),\n ...options,\n });\n}\n\nexport function useCreateLeaveRequest(\n client: OracleEBSClient,\n options?: UseMutationOptions<CreateLeaveRequestResponse, Error, CreateLeaveRequestInput>\n) {\n return useMutation({\n mutationFn: (input) => client.leaves.createRequest(input),\n ...options,\n });\n}\n\n// SIT Requests hooks\nexport function useSitSegments(\n client: OracleEBSClient,\n params: GetSitSegmentsParams,\n options?: UseQueryOptions<GetSitSegmentsResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.sitRequests.segments(params),\n queryFn: () => client.sitRequests.getSegments(params),\n ...options,\n });\n}\n\nexport function useSaveAndPreviewSitRequest(\n client: OracleEBSClient,\n options?: UseMutationOptions<SaveAndPreviewSitRequestResponse, Error, SaveAndPreviewSitRequestInput>\n) {\n return useMutation({\n mutationFn: (input) => client.sitRequests.saveAndPreview(input),\n ...options,\n });\n}\n\nexport function useSubmitSitRequest(\n client: OracleEBSClient,\n options?: UseMutationOptions<SubmitSitRequestResponse, Error, SubmitSitRequestInput>\n) {\n return useMutation({\n mutationFn: (input) => client.sitRequests.submit(input),\n ...options,\n });\n}\n\n// Notifications hooks\nexport function useNotifications(\n client: OracleEBSClient,\n options?: UseQueryOptions<GetNotificationsResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.notifications.list,\n queryFn: () => client.notifications.getList(),\n ...options,\n });\n}\n\nexport function useNotificationDetails(\n client: OracleEBSClient,\n params: GetNotificationDetailsParams,\n options?: UseQueryOptions<NotificationDetails, Error>\n) {\n return useQuery({\n queryKey: queryKeys.notifications.details(params.notificationId),\n queryFn: () => client.notifications.getDetails(params),\n ...options,\n });\n}\n\nexport function useProcessApproval(\n client: OracleEBSClient,\n options?: UseMutationOptions<ProcessApprovalResponse, Error, ProcessApprovalInput>\n) {\n return useMutation({\n mutationFn: (input) => client.notifications.processApproval(input),\n ...options,\n });\n}\n\n// Payslip hooks\nexport function usePayslipHeader(\n client: OracleEBSClient,\n params: GetPayslipHeaderParams,\n options?: UseQueryOptions<PayslipHeader, Error>\n) {\n return useQuery({\n queryKey: queryKeys.payslip.header(params.periodName),\n queryFn: () => client.payslip.getHeader(params),\n ...options,\n });\n}\n\nexport function usePayslipDetails(\n client: OracleEBSClient,\n params: GetPayslipDetailsParams,\n options?: UseQueryOptions<GetPayslipDetailsResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.payslip.details(params.periodName),\n queryFn: () => client.payslip.getDetails(params),\n ...options,\n });\n}\n\n// Employee hooks\nexport function usePersonalInfo(\n client: OracleEBSClient,\n options?: UseQueryOptions<PersonalInformation, Error>\n) {\n return useQuery({\n queryKey: queryKeys.employee.personalInfo,\n queryFn: () => client.employee.getPersonalInfo(),\n ...options,\n });\n}\n\nexport function useEmployeeHierarchy(\n client: OracleEBSClient,\n options?: UseQueryOptions<GetEmployeeHierarchyResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.employee.hierarchy,\n queryFn: () => client.employee.getHierarchy(),\n ...options,\n });\n}\n\n// Accrual Balances hooks\nexport function useAccrualBalances(\n client: OracleEBSClient,\n params: GetAccrualBalancesParams,\n options?: UseQueryOptions<GetAccrualBalancesResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.accrualBalances.get(params.calculationDate),\n queryFn: () => client.accrualBalances.getBalances(params),\n ...options,\n });\n}\n\n// Forms hooks\nexport function useTableColumns(\n client: OracleEBSClient,\n params: GetTableColumnsParams,\n options?: UseQueryOptions<GetTableColumnsResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.forms.tableColumns(params.tableName),\n queryFn: () => client.forms.getTableColumns(params),\n ...options,\n });\n}\n\nexport function useDffSegments(\n client: OracleEBSClient,\n params: GetDffSegmentsParams,\n options?: UseQueryOptions<GetDffSegmentsResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.forms.dffSegments(params),\n queryFn: () => client.forms.getDffSegments(params),\n ...options,\n });\n}\n\n// Health hooks\nexport function useHealthCheck(\n client: OracleEBSClient,\n options?: UseQueryOptions<HealthCheckResponse, Error>\n) {\n return useQuery({\n queryKey: queryKeys.health.check,\n queryFn: () => client.health.check(),\n ...options,\n });\n}\n"]}
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OracleEBSConfig, O as OracleEBSClient } from '../OracleEBSClient-
|
|
1
|
+
import { a as OracleEBSConfig, O as OracleEBSClient } from '../OracleEBSClient-BDnxW4cW.mjs';
|
|
2
2
|
import 'ky';
|
|
3
3
|
|
|
4
4
|
declare function createServerClient(config: OracleEBSConfig): OracleEBSClient;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OracleEBSConfig, O as OracleEBSClient } from '../OracleEBSClient-
|
|
1
|
+
import { a as OracleEBSConfig, O as OracleEBSClient } from '../OracleEBSClient-BDnxW4cW.js';
|
|
2
2
|
import 'ky';
|
|
3
3
|
|
|
4
4
|
declare function createServerClient(config: OracleEBSConfig): OracleEBSClient;
|
package/dist/server/index.js
CHANGED
|
@@ -179,7 +179,8 @@ var BaseClient = class {
|
|
|
179
179
|
async post(url, data, options) {
|
|
180
180
|
try {
|
|
181
181
|
this.log("info", `POST ${url}`);
|
|
182
|
-
const
|
|
182
|
+
const requestOptions = data instanceof FormData ? { body: data, ...options } : { json: data, ...options };
|
|
183
|
+
const response = await this.client.post(url, requestOptions).json();
|
|
183
184
|
return response;
|
|
184
185
|
} catch (error) {
|
|
185
186
|
throw this.handleError(error);
|
|
@@ -368,10 +369,11 @@ var SitRequestsModule = class extends BaseClient {
|
|
|
368
369
|
*/
|
|
369
370
|
async getHistory(params) {
|
|
370
371
|
const searchParams = new URLSearchParams();
|
|
371
|
-
|
|
372
|
-
if (params
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
searchParams.set("sitName", params.sitName);
|
|
373
|
+
if (params.transactionId) searchParams.set("transactionId", params.transactionId);
|
|
374
|
+
if (params.startDate) searchParams.set("startDate", params.startDate);
|
|
375
|
+
if (params.endDate) searchParams.set("endDate", params.endDate);
|
|
376
|
+
const response = await this.get(`sit-requests/history?${searchParams}`);
|
|
375
377
|
return response.data;
|
|
376
378
|
}
|
|
377
379
|
};
|
|
@@ -395,78 +397,92 @@ var NotificationsModule = class extends BaseClient {
|
|
|
395
397
|
return response.data;
|
|
396
398
|
}
|
|
397
399
|
/**
|
|
398
|
-
*
|
|
400
|
+
* Get all notification details (SSHR_SIT_REQDTLS)
|
|
401
|
+
* All parameters are required
|
|
402
|
+
*/
|
|
403
|
+
async getAllDetails(params) {
|
|
404
|
+
const searchParams = new URLSearchParams();
|
|
405
|
+
searchParams.set("notificationId", params.notificationId);
|
|
406
|
+
searchParams.set("itemKey", params.itemKey);
|
|
407
|
+
searchParams.set("analysisCriteriaId", params.analysisCriteriaId);
|
|
408
|
+
searchParams.set("idFlexNum", params.idFlexNum);
|
|
409
|
+
const response = await this.get(`notifications/all-details?${searchParams}`);
|
|
410
|
+
return response.data;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Get absence details for FYI notifications
|
|
414
|
+
*/
|
|
415
|
+
async getAbsenceDetails(params) {
|
|
416
|
+
const searchParams = new URLSearchParams();
|
|
417
|
+
searchParams.set("itemKey", params.itemKey);
|
|
418
|
+
const response = await this.get(`notifications/absence-details?${searchParams}`);
|
|
419
|
+
return response.data;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Get action history for a notification
|
|
423
|
+
*/
|
|
424
|
+
async getActionHistory(params) {
|
|
425
|
+
const searchParams = new URLSearchParams();
|
|
426
|
+
searchParams.set("notificationId", params.notificationId);
|
|
427
|
+
const response = await this.get(`notifications/action-history?${searchParams}`);
|
|
428
|
+
return response.data;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Process approval action (APPROVE/DECLINE)
|
|
399
432
|
*/
|
|
400
433
|
async processApproval(input) {
|
|
401
|
-
const response = await this.post("notifications/process-approval", input);
|
|
434
|
+
const response = await this.post("notifications/process-approval-action", input);
|
|
402
435
|
return response.data;
|
|
403
436
|
}
|
|
404
437
|
/**
|
|
405
438
|
* Close FYI notification
|
|
406
439
|
*/
|
|
407
440
|
async closeFyi(params) {
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
441
|
+
const response = await this.post("notifications/close-fyi", {
|
|
442
|
+
notificationId: params.notificationId
|
|
443
|
+
});
|
|
411
444
|
return response.data;
|
|
412
445
|
}
|
|
413
446
|
};
|
|
414
447
|
|
|
415
448
|
// src/modules/PayslipModule.ts
|
|
416
449
|
var PayslipModule = class extends BaseClient {
|
|
417
|
-
/**
|
|
418
|
-
* Get employee number from stored user context
|
|
419
|
-
*/
|
|
420
|
-
getEmployeeNumberFromContext(providedEmployeeNumber) {
|
|
421
|
-
if (providedEmployeeNumber) {
|
|
422
|
-
return providedEmployeeNumber;
|
|
423
|
-
}
|
|
424
|
-
const employeeNumber = this.getEmployeeNumber();
|
|
425
|
-
if (!employeeNumber) {
|
|
426
|
-
throw new Error("Employee number not available. Please login first.");
|
|
427
|
-
}
|
|
428
|
-
return employeeNumber;
|
|
429
|
-
}
|
|
430
450
|
/**
|
|
431
451
|
* Get payslip header
|
|
452
|
+
* Note: employeeNumber is extracted from JWT by backend
|
|
432
453
|
*/
|
|
433
454
|
async getHeader(params) {
|
|
434
|
-
const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);
|
|
435
455
|
const searchParams = new URLSearchParams();
|
|
436
|
-
searchParams.set("employeeNumber", employeeNumber);
|
|
437
456
|
searchParams.set("periodName", params.periodName);
|
|
438
457
|
const response = await this.get(`payslip/header?${searchParams}`);
|
|
439
458
|
return response.data;
|
|
440
459
|
}
|
|
441
460
|
/**
|
|
442
461
|
* Get payslip details
|
|
462
|
+
* Note: employeeNumber is extracted from JWT by backend
|
|
443
463
|
*/
|
|
444
464
|
async getDetails(params) {
|
|
445
|
-
const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);
|
|
446
465
|
const searchParams = new URLSearchParams();
|
|
447
|
-
searchParams.set("employeeNumber", employeeNumber);
|
|
448
466
|
searchParams.set("periodName", params.periodName);
|
|
449
467
|
const response = await this.get(`payslip/details?${searchParams}`);
|
|
450
468
|
return response.data;
|
|
451
469
|
}
|
|
452
470
|
/**
|
|
453
471
|
* Get payslip leave details
|
|
472
|
+
* Note: employeeNumber is extracted from JWT by backend
|
|
454
473
|
*/
|
|
455
474
|
async getLeaveDetails(params) {
|
|
456
|
-
const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);
|
|
457
475
|
const searchParams = new URLSearchParams();
|
|
458
|
-
searchParams.set("employeeNumber", employeeNumber);
|
|
459
476
|
searchParams.set("periodName", params.periodName);
|
|
460
477
|
const response = await this.get(`payslip/leave-details?${searchParams}`);
|
|
461
478
|
return response.data;
|
|
462
479
|
}
|
|
463
480
|
/**
|
|
464
481
|
* Get payslip run balances
|
|
482
|
+
* Note: employeeNumber is extracted from JWT by backend
|
|
465
483
|
*/
|
|
466
484
|
async getRunBalances(params) {
|
|
467
|
-
const employeeNumber = this.getEmployeeNumberFromContext(params.employeeNumber);
|
|
468
485
|
const searchParams = new URLSearchParams();
|
|
469
|
-
searchParams.set("employeeNumber", employeeNumber);
|
|
470
486
|
searchParams.set("periodName", params.periodName);
|
|
471
487
|
const response = await this.get(`payslip/run-balances?${searchParams}`);
|
|
472
488
|
return response.data;
|
|
@@ -545,6 +561,127 @@ var HealthModule = class extends BaseClient {
|
|
|
545
561
|
}
|
|
546
562
|
};
|
|
547
563
|
|
|
564
|
+
// src/modules/AiModule.ts
|
|
565
|
+
var AiModule = class extends BaseClient {
|
|
566
|
+
/**
|
|
567
|
+
* Send a text message to the AI assistant
|
|
568
|
+
* @param request Chat request with message and optional history
|
|
569
|
+
* @returns AI response with message and CTAs
|
|
570
|
+
*/
|
|
571
|
+
async sendMessage(request) {
|
|
572
|
+
const response = await this.post("ai/chat", request);
|
|
573
|
+
return response.data;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Send a voice message to the AI assistant
|
|
577
|
+
* @param audioBlob Audio file as Blob
|
|
578
|
+
* @param options Optional language and threadId for conversation continuity
|
|
579
|
+
* @returns Transcription and AI response
|
|
580
|
+
*/
|
|
581
|
+
async sendVoice(audioBlob, options) {
|
|
582
|
+
const formData = new FormData();
|
|
583
|
+
formData.append("audio", audioBlob, "voice-message.webm");
|
|
584
|
+
if (options?.language) {
|
|
585
|
+
formData.append("language", options.language);
|
|
586
|
+
}
|
|
587
|
+
if (options?.threadId) {
|
|
588
|
+
formData.append("threadId", options.threadId);
|
|
589
|
+
}
|
|
590
|
+
const response = await this.post("ai/voice", formData, {
|
|
591
|
+
headers: {
|
|
592
|
+
// Let browser set Content-Type with boundary for multipart/form-data
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
return response.data;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Save chat message to local history
|
|
599
|
+
* @param message Chat message to save
|
|
600
|
+
*/
|
|
601
|
+
saveChatMessage(message) {
|
|
602
|
+
try {
|
|
603
|
+
const history = this.getLocalChatHistory();
|
|
604
|
+
history.push({
|
|
605
|
+
...message,
|
|
606
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
607
|
+
});
|
|
608
|
+
const trimmedHistory = history.slice(-50);
|
|
609
|
+
if (typeof localStorage !== "undefined") {
|
|
610
|
+
localStorage.setItem(
|
|
611
|
+
"ai_chat_history",
|
|
612
|
+
JSON.stringify(trimmedHistory)
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
} catch (error) {
|
|
616
|
+
console.error("Failed to save chat message:", error);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Get local chat history from localStorage
|
|
621
|
+
* @returns Array of chat messages with timestamps
|
|
622
|
+
*/
|
|
623
|
+
getLocalChatHistory() {
|
|
624
|
+
try {
|
|
625
|
+
if (typeof localStorage === "undefined") return [];
|
|
626
|
+
const stored = localStorage.getItem("ai_chat_history");
|
|
627
|
+
if (!stored) return [];
|
|
628
|
+
const parsed = JSON.parse(stored);
|
|
629
|
+
return parsed.map((msg) => ({
|
|
630
|
+
...msg,
|
|
631
|
+
timestamp: new Date(msg.timestamp)
|
|
632
|
+
}));
|
|
633
|
+
} catch (error) {
|
|
634
|
+
console.error("Failed to get chat history:", error);
|
|
635
|
+
return [];
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Clear local chat history
|
|
640
|
+
*/
|
|
641
|
+
clearChatHistory() {
|
|
642
|
+
try {
|
|
643
|
+
if (typeof localStorage !== "undefined") {
|
|
644
|
+
localStorage.removeItem("ai_chat_history");
|
|
645
|
+
}
|
|
646
|
+
} catch (error) {
|
|
647
|
+
console.error("Failed to clear chat history:", error);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
// ==================== Chat Thread Management ====================
|
|
651
|
+
/**
|
|
652
|
+
* Get all chat threads for the current user
|
|
653
|
+
* @returns Array of chat threads
|
|
654
|
+
*/
|
|
655
|
+
async getChatThreads() {
|
|
656
|
+
const response = await this.get("ai/threads");
|
|
657
|
+
return response.data.threads;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Get messages for a specific thread
|
|
661
|
+
* @param threadId Thread ID
|
|
662
|
+
* @returns Thread with messages
|
|
663
|
+
*/
|
|
664
|
+
async getThreadMessages(threadId) {
|
|
665
|
+
const response = await this.get(`ai/threads/${threadId}/messages`);
|
|
666
|
+
return response.data;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Create a new chat thread
|
|
670
|
+
* @returns New thread
|
|
671
|
+
*/
|
|
672
|
+
async createThread() {
|
|
673
|
+
const response = await this.post("ai/threads", {});
|
|
674
|
+
return response.data.thread;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Delete a chat thread
|
|
678
|
+
* @param threadId Thread ID to delete
|
|
679
|
+
*/
|
|
680
|
+
async deleteThread(threadId) {
|
|
681
|
+
await this.delete(`ai/threads/${threadId}`);
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
|
|
548
685
|
// src/client/OracleEBSClient.ts
|
|
549
686
|
var OracleEBSClient = class {
|
|
550
687
|
constructor(config) {
|
|
@@ -557,6 +694,7 @@ var OracleEBSClient = class {
|
|
|
557
694
|
this.accrualBalances = new AccrualBalancesModule(config);
|
|
558
695
|
this.forms = new FormsModule(config);
|
|
559
696
|
this.health = new HealthModule(config);
|
|
697
|
+
this.ai = new AiModule(config);
|
|
560
698
|
}
|
|
561
699
|
/**
|
|
562
700
|
* Set authentication token for all modules
|
|
@@ -571,6 +709,7 @@ var OracleEBSClient = class {
|
|
|
571
709
|
this.accrualBalances.setToken(token, user);
|
|
572
710
|
this.forms.setToken(token, user);
|
|
573
711
|
this.health.setToken(token, user);
|
|
712
|
+
this.ai.setToken(token, user);
|
|
574
713
|
}
|
|
575
714
|
/**
|
|
576
715
|
* Clear authentication token from all modules
|
|
@@ -585,6 +724,7 @@ var OracleEBSClient = class {
|
|
|
585
724
|
this.accrualBalances.clearToken();
|
|
586
725
|
this.forms.clearToken();
|
|
587
726
|
this.health.clearToken();
|
|
727
|
+
this.ai.clearToken();
|
|
588
728
|
}
|
|
589
729
|
};
|
|
590
730
|
|