@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
|
@@ -216,6 +216,8 @@ interface SubmitSitRequestResponse {
|
|
|
216
216
|
itemKey: string;
|
|
217
217
|
}
|
|
218
218
|
interface GetSitHistoryParams {
|
|
219
|
+
sitName: string;
|
|
220
|
+
transactionId?: string;
|
|
219
221
|
startDate?: string;
|
|
220
222
|
endDate?: string;
|
|
221
223
|
}
|
|
@@ -234,52 +236,155 @@ declare class SitRequestsModule extends BaseClient {
|
|
|
234
236
|
getSegments(params: GetSitSegmentsParams): Promise<GetSitSegmentsResponse>;
|
|
235
237
|
saveAndPreview(input: SaveAndPreviewSitRequestInput): Promise<SaveAndPreviewSitRequestResponse>;
|
|
236
238
|
submit(input: SubmitSitRequestInput): Promise<SubmitSitRequestResponse>;
|
|
237
|
-
getHistory(params
|
|
239
|
+
getHistory(params: GetSitHistoryParams): Promise<GetSitHistoryResponse>;
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
interface Notification {
|
|
241
243
|
notificationId: string;
|
|
242
244
|
subject: string;
|
|
243
|
-
status
|
|
244
|
-
createdDate
|
|
245
|
+
status?: string;
|
|
246
|
+
createdDate?: string;
|
|
247
|
+
fromUser?: string;
|
|
248
|
+
beginDate?: string;
|
|
249
|
+
dueDate?: string | null;
|
|
250
|
+
notificationType?: 'FYI' | 'ACTION_REQUIRED';
|
|
245
251
|
itemKey?: string;
|
|
246
252
|
analysisCriteriaId?: string;
|
|
253
|
+
userId?: string;
|
|
254
|
+
[key: string]: any;
|
|
247
255
|
}
|
|
248
256
|
interface GetNotificationsResponse {
|
|
249
|
-
notifications
|
|
257
|
+
notifications?: Notification[];
|
|
258
|
+
[key: string]: any;
|
|
250
259
|
}
|
|
251
260
|
interface NotificationDetails {
|
|
252
|
-
notificationId
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
261
|
+
notificationId?: string;
|
|
262
|
+
itemKey?: string;
|
|
263
|
+
analysisCriteriaId?: string;
|
|
264
|
+
idFlexNum?: string;
|
|
265
|
+
title?: string;
|
|
266
|
+
description?: string;
|
|
267
|
+
status?: string;
|
|
268
|
+
createdDate?: string;
|
|
257
269
|
dueDate?: string;
|
|
270
|
+
userId?: string;
|
|
271
|
+
userName?: string;
|
|
272
|
+
action?: string;
|
|
273
|
+
lastUpdatedDate?: string;
|
|
274
|
+
comments?: string;
|
|
258
275
|
priority?: string;
|
|
276
|
+
notificationType?: string;
|
|
277
|
+
[key: string]: any;
|
|
259
278
|
}
|
|
260
279
|
interface GetNotificationDetailsParams {
|
|
261
280
|
notificationId: string;
|
|
262
281
|
}
|
|
282
|
+
interface GetAllDetailsParams {
|
|
283
|
+
notificationId: string;
|
|
284
|
+
itemKey: string;
|
|
285
|
+
analysisCriteriaId: string;
|
|
286
|
+
idFlexNum: string;
|
|
287
|
+
}
|
|
288
|
+
interface AllDetailsResponse {
|
|
289
|
+
itemKeyDetails?: {
|
|
290
|
+
itemType?: string;
|
|
291
|
+
itemKey?: string;
|
|
292
|
+
};
|
|
293
|
+
headerDetails?: {
|
|
294
|
+
transactionId?: string;
|
|
295
|
+
creatorPersonId?: string;
|
|
296
|
+
creatorPersonName?: string;
|
|
297
|
+
selectedPersonId?: string;
|
|
298
|
+
selectedPersonName?: string;
|
|
299
|
+
createdBy?: string;
|
|
300
|
+
createdByUserName?: string;
|
|
301
|
+
createdByPersonName?: string;
|
|
302
|
+
creationDate?: string;
|
|
303
|
+
lastUpdateDate?: string;
|
|
304
|
+
lastUpdatedBy?: string;
|
|
305
|
+
functionId?: string;
|
|
306
|
+
transactionRefTable?: string;
|
|
307
|
+
assignmentId?: string;
|
|
308
|
+
processName?: string;
|
|
309
|
+
};
|
|
310
|
+
stepDetails?: {
|
|
311
|
+
transactionStepId?: string;
|
|
312
|
+
transactionId?: string;
|
|
313
|
+
apiName?: string;
|
|
314
|
+
itemType?: string;
|
|
315
|
+
itemKey?: string;
|
|
316
|
+
activityId?: string;
|
|
317
|
+
};
|
|
318
|
+
segmentDetails?: Array<{
|
|
319
|
+
segmentNum?: string;
|
|
320
|
+
segmentName?: string;
|
|
321
|
+
segmentValue?: string;
|
|
322
|
+
}>;
|
|
323
|
+
[key: string]: any;
|
|
324
|
+
}
|
|
325
|
+
interface GetAbsenceDetailsParams {
|
|
326
|
+
itemKey: string;
|
|
327
|
+
}
|
|
328
|
+
interface AbsenceDetailsResponse {
|
|
329
|
+
absenceAttendanceId?: string;
|
|
330
|
+
businessGroupId?: string;
|
|
331
|
+
absenceAttendanceTypeId?: string;
|
|
332
|
+
absenceTypeName?: string;
|
|
333
|
+
personId?: string;
|
|
334
|
+
absenceDays?: string;
|
|
335
|
+
dateEnd?: string;
|
|
336
|
+
dateNotification?: string;
|
|
337
|
+
dateStart?: string;
|
|
338
|
+
attribute1?: string;
|
|
339
|
+
attribute2?: string;
|
|
340
|
+
attribute3?: string;
|
|
341
|
+
attribute4?: string;
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
}
|
|
344
|
+
interface GetActionHistoryParams {
|
|
345
|
+
notificationId: string;
|
|
346
|
+
}
|
|
347
|
+
interface ActionHistoryItem {
|
|
348
|
+
notificationId?: string;
|
|
349
|
+
action?: string;
|
|
350
|
+
actionDescription?: string;
|
|
351
|
+
performedBy?: string;
|
|
352
|
+
performedByName?: string;
|
|
353
|
+
actionDate?: string;
|
|
354
|
+
comments?: string;
|
|
355
|
+
[key: string]: any;
|
|
356
|
+
}
|
|
357
|
+
interface ActionHistoryResponse {
|
|
358
|
+
history?: ActionHistoryItem[];
|
|
359
|
+
[key: string]: any;
|
|
360
|
+
}
|
|
263
361
|
interface ProcessApprovalInput {
|
|
264
362
|
notificationId: string;
|
|
265
|
-
action: 'APPROVE' | '
|
|
363
|
+
action: 'APPROVE' | 'DECLINE';
|
|
266
364
|
comments?: string;
|
|
365
|
+
responderUserName?: string;
|
|
267
366
|
}
|
|
268
367
|
interface ProcessApprovalResponse {
|
|
269
|
-
status
|
|
270
|
-
message
|
|
368
|
+
status?: string;
|
|
369
|
+
message?: string;
|
|
370
|
+
errorMessage?: string;
|
|
371
|
+
[key: string]: any;
|
|
271
372
|
}
|
|
272
373
|
interface CloseFyiParams {
|
|
273
374
|
notificationId: string;
|
|
274
375
|
}
|
|
275
376
|
interface CloseFyiResponse {
|
|
276
|
-
status
|
|
277
|
-
message
|
|
377
|
+
status?: string;
|
|
378
|
+
message?: string;
|
|
379
|
+
[key: string]: any;
|
|
278
380
|
}
|
|
279
381
|
|
|
280
382
|
declare class NotificationsModule extends BaseClient {
|
|
281
383
|
getList(): Promise<GetNotificationsResponse>;
|
|
282
384
|
getDetails(params: GetNotificationDetailsParams): Promise<NotificationDetails>;
|
|
385
|
+
getAllDetails(params: GetAllDetailsParams): Promise<AllDetailsResponse>;
|
|
386
|
+
getAbsenceDetails(params: GetAbsenceDetailsParams): Promise<AbsenceDetailsResponse>;
|
|
387
|
+
getActionHistory(params: GetActionHistoryParams): Promise<ActionHistoryResponse>;
|
|
283
388
|
processApproval(input: ProcessApprovalInput): Promise<ProcessApprovalResponse>;
|
|
284
389
|
closeFyi(params: CloseFyiParams): Promise<CloseFyiResponse>;
|
|
285
390
|
}
|
|
@@ -345,7 +450,6 @@ interface GetPayslipRunBalancesResponse {
|
|
|
345
450
|
}
|
|
346
451
|
|
|
347
452
|
declare class PayslipModule extends BaseClient {
|
|
348
|
-
private getEmployeeNumberFromContext;
|
|
349
453
|
getHeader(params: GetPayslipHeaderParams): Promise<PayslipHeader>;
|
|
350
454
|
getDetails(params: GetPayslipDetailsParams): Promise<GetPayslipDetailsResponse>;
|
|
351
455
|
getLeaveDetails(params: GetPayslipLeaveDetailsParams): Promise<GetPayslipLeaveDetailsResponse>;
|
|
@@ -456,6 +560,142 @@ declare class HealthModule extends BaseClient {
|
|
|
456
560
|
ping(): Promise<string>;
|
|
457
561
|
}
|
|
458
562
|
|
|
563
|
+
declare enum MessageRole {
|
|
564
|
+
USER = "user",
|
|
565
|
+
ASSISTANT = "assistant",
|
|
566
|
+
SYSTEM = "system"
|
|
567
|
+
}
|
|
568
|
+
declare enum ActionType {
|
|
569
|
+
NAVIGATE = "navigate",
|
|
570
|
+
API_CALL = "api_call",
|
|
571
|
+
DOWNLOAD = "download",
|
|
572
|
+
CLOSE_NOTIFICATION = "close_notification",
|
|
573
|
+
SUBMIT_LEAVE = "submit_leave",
|
|
574
|
+
APPROVE_NOTIFICATION = "approve_notification",
|
|
575
|
+
DECLINE_NOTIFICATION = "decline_notification"
|
|
576
|
+
}
|
|
577
|
+
declare enum UserIntent {
|
|
578
|
+
NOTIFICATIONS_SUMMARY = "notifications_summary",
|
|
579
|
+
NOTIFICATION_CLOSE = "notification_close",
|
|
580
|
+
NOTIFICATION_ACTION = "notification_action",
|
|
581
|
+
PAYSLIP_QUERY = "payslip_query",
|
|
582
|
+
PAYSLIP_RETRIEVAL = "payslip_retrieval",
|
|
583
|
+
SALARY_DEDUCTION = "salary_deduction",
|
|
584
|
+
LEAVE_BALANCE = "leave_balance",
|
|
585
|
+
LEAVE_REQUEST = "leave_request",
|
|
586
|
+
PROFILE_INFO = "profile_info",
|
|
587
|
+
HIRING_DATE = "hiring_date",
|
|
588
|
+
POSITION_INFO = "position_info",
|
|
589
|
+
GENERAL_QUERY = "general_query",
|
|
590
|
+
OUT_OF_SCOPE = "out_of_scope"
|
|
591
|
+
}
|
|
592
|
+
interface ChatMessage {
|
|
593
|
+
role: MessageRole;
|
|
594
|
+
content: string;
|
|
595
|
+
}
|
|
596
|
+
interface CallToAction {
|
|
597
|
+
id: string;
|
|
598
|
+
label: string;
|
|
599
|
+
type: ActionType;
|
|
600
|
+
params?: Record<string, any>;
|
|
601
|
+
path?: string;
|
|
602
|
+
icon?: string;
|
|
603
|
+
variant?: 'default' | 'outline' | 'ghost' | 'destructive';
|
|
604
|
+
}
|
|
605
|
+
interface AiResponse {
|
|
606
|
+
message: string;
|
|
607
|
+
ctas?: CallToAction[];
|
|
608
|
+
metadata?: {
|
|
609
|
+
intent?: UserIntent;
|
|
610
|
+
model?: string;
|
|
611
|
+
tokensUsed?: number;
|
|
612
|
+
[key: string]: any;
|
|
613
|
+
};
|
|
614
|
+
requiresAction?: boolean;
|
|
615
|
+
chartData?: any;
|
|
616
|
+
threadId?: string;
|
|
617
|
+
}
|
|
618
|
+
interface ChatRequest {
|
|
619
|
+
message: string;
|
|
620
|
+
language?: 'en' | 'ar';
|
|
621
|
+
history?: ChatMessage[];
|
|
622
|
+
threadId?: string;
|
|
623
|
+
}
|
|
624
|
+
interface VoiceTranscription {
|
|
625
|
+
text: string;
|
|
626
|
+
language: string;
|
|
627
|
+
confidence?: number;
|
|
628
|
+
duration?: number;
|
|
629
|
+
}
|
|
630
|
+
interface VoiceResponse {
|
|
631
|
+
transcription: VoiceTranscription;
|
|
632
|
+
response: AiResponse;
|
|
633
|
+
}
|
|
634
|
+
interface ChatHistory {
|
|
635
|
+
id: string;
|
|
636
|
+
messages: Array<ChatMessage & {
|
|
637
|
+
timestamp: Date;
|
|
638
|
+
}>;
|
|
639
|
+
createdAt: Date;
|
|
640
|
+
updatedAt: Date;
|
|
641
|
+
}
|
|
642
|
+
interface ChatThread {
|
|
643
|
+
id: string;
|
|
644
|
+
userId: string;
|
|
645
|
+
username: string;
|
|
646
|
+
title: string | null;
|
|
647
|
+
status: string;
|
|
648
|
+
intent: string | null;
|
|
649
|
+
createdAt: Date;
|
|
650
|
+
updatedAt: Date;
|
|
651
|
+
lastMessageAt: Date;
|
|
652
|
+
messageCount: number;
|
|
653
|
+
}
|
|
654
|
+
interface ThreadMessage {
|
|
655
|
+
id: string;
|
|
656
|
+
threadId: string;
|
|
657
|
+
role: 'user' | 'assistant';
|
|
658
|
+
content: string;
|
|
659
|
+
metadata?: {
|
|
660
|
+
intent?: string;
|
|
661
|
+
ctas?: CallToAction[];
|
|
662
|
+
tokensUsed?: number;
|
|
663
|
+
[key: string]: any;
|
|
664
|
+
};
|
|
665
|
+
createdAt: Date;
|
|
666
|
+
}
|
|
667
|
+
interface GetThreadMessagesResponse {
|
|
668
|
+
thread: ChatThread;
|
|
669
|
+
messages: ThreadMessage[];
|
|
670
|
+
}
|
|
671
|
+
interface GetThreadsResponse {
|
|
672
|
+
threads: ChatThread[];
|
|
673
|
+
}
|
|
674
|
+
interface CreateThreadResponse {
|
|
675
|
+
thread: ChatThread;
|
|
676
|
+
}
|
|
677
|
+
interface DeleteThreadResponse {
|
|
678
|
+
success: boolean;
|
|
679
|
+
message: string;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare class AiModule extends BaseClient {
|
|
683
|
+
sendMessage(request: ChatRequest): Promise<AiResponse>;
|
|
684
|
+
sendVoice(audioBlob: Blob, options?: {
|
|
685
|
+
language?: 'en' | 'ar';
|
|
686
|
+
threadId?: string;
|
|
687
|
+
}): Promise<VoiceResponse>;
|
|
688
|
+
saveChatMessage(message: ChatMessage): void;
|
|
689
|
+
getLocalChatHistory(): Array<ChatMessage & {
|
|
690
|
+
timestamp: Date;
|
|
691
|
+
}>;
|
|
692
|
+
clearChatHistory(): void;
|
|
693
|
+
getChatThreads(): Promise<ChatThread[]>;
|
|
694
|
+
getThreadMessages(threadId: string): Promise<GetThreadMessagesResponse>;
|
|
695
|
+
createThread(): Promise<ChatThread>;
|
|
696
|
+
deleteThread(threadId: string): Promise<void>;
|
|
697
|
+
}
|
|
698
|
+
|
|
459
699
|
declare class OracleEBSClient {
|
|
460
700
|
readonly auth: AuthModule;
|
|
461
701
|
readonly leaves: LeavesModule;
|
|
@@ -466,6 +706,7 @@ declare class OracleEBSClient {
|
|
|
466
706
|
readonly accrualBalances: AccrualBalancesModule;
|
|
467
707
|
readonly forms: FormsModule;
|
|
468
708
|
readonly health: HealthModule;
|
|
709
|
+
readonly ai: AiModule;
|
|
469
710
|
constructor(config: OracleEBSConfig);
|
|
470
711
|
setToken(token: string, user?: {
|
|
471
712
|
userName?: string;
|
|
@@ -478,4 +719,4 @@ declare class OracleEBSClient {
|
|
|
478
719
|
clearToken(): void;
|
|
479
720
|
}
|
|
480
721
|
|
|
481
|
-
export { type APIResponse as A, type GetPayslipDetailsParams as B, type CacheOptions as C, type PayslipDetail as D, type GetPayslipDetailsResponse as E, type PersonalInformation as F, type GetAbsenceTypesParams as G, type EmployeeHierarchyNode as H, type GetEmployeeHierarchyResponse as I, type GetTableColumnsParams as J, type GetTableColumnsResponse as K, type LoginCredentials as L, type DffSegment as M, type Notification as N, OracleEBSClient as O, type ProcessApprovalInput as P, type GetDffSegmentsParams as Q, type RetryOptions as R, type SitSegment as S, type TableColumn as T, type UserContext as U, type GetDffSegmentsResponse as V, type HealthCheckResponse as W, type AccrualBalance as X, type GetAccrualBalancesParams as Y, type GetAccrualBalancesResponse as Z, type OracleEBSConfig as a, type LoginResponse as b, type Responsibility as c, type AbsenceType as d, type GetAbsenceTypesResponse as e, type LeaveHistoryRecord as f, type GetLeaveHistoryResponse as g, type CreateLeaveRequestInput as h, type CreateLeaveRequestResponse as i, type GetSitSegmentsParams as j, type GetSitSegmentsResponse as k, type SaveAndPreviewSitRequestInput as l, type SaveAndPreviewSitRequestResponse as m, type SubmitSitRequestInput as n, type SubmitSitRequestResponse as o, type GetSitHistoryParams as p, type SitHistoryRecord as q, type GetSitHistoryResponse as r, type GetNotificationsResponse as s, type NotificationDetails as t, type GetNotificationDetailsParams as u, type ProcessApprovalResponse as v, type CloseFyiParams as w, type CloseFyiResponse as x, type GetPayslipHeaderParams as y, type PayslipHeader as z };
|
|
722
|
+
export { ActionType as $, type APIResponse as A, type GetPayslipDetailsParams as B, type CacheOptions as C, type PayslipDetail as D, type GetPayslipDetailsResponse as E, type PersonalInformation as F, type GetAbsenceTypesParams as G, type EmployeeHierarchyNode as H, type GetEmployeeHierarchyResponse as I, type GetTableColumnsParams as J, type GetTableColumnsResponse as K, type LoginCredentials as L, type DffSegment as M, type Notification as N, OracleEBSClient as O, type ProcessApprovalInput as P, type GetDffSegmentsParams as Q, type RetryOptions as R, type SitSegment as S, type TableColumn as T, type UserContext as U, type GetDffSegmentsResponse as V, type HealthCheckResponse as W, type AccrualBalance as X, type GetAccrualBalancesParams as Y, type GetAccrualBalancesResponse as Z, MessageRole as _, type OracleEBSConfig as a, UserIntent as a0, type ChatMessage as a1, type CallToAction as a2, type AiResponse as a3, type ChatRequest as a4, type VoiceTranscription as a5, type VoiceResponse as a6, type ChatHistory as a7, type ChatThread as a8, type ThreadMessage as a9, type GetThreadMessagesResponse as aa, type GetThreadsResponse as ab, type CreateThreadResponse as ac, type DeleteThreadResponse as ad, type LoginResponse as b, type Responsibility as c, type AbsenceType as d, type GetAbsenceTypesResponse as e, type LeaveHistoryRecord as f, type GetLeaveHistoryResponse as g, type CreateLeaveRequestInput as h, type CreateLeaveRequestResponse as i, type GetSitSegmentsParams as j, type GetSitSegmentsResponse as k, type SaveAndPreviewSitRequestInput as l, type SaveAndPreviewSitRequestResponse as m, type SubmitSitRequestInput as n, type SubmitSitRequestResponse as o, type GetSitHistoryParams as p, type SitHistoryRecord as q, type GetSitHistoryResponse as r, type GetNotificationsResponse as s, type NotificationDetails as t, type GetNotificationDetailsParams as u, type ProcessApprovalResponse as v, type CloseFyiParams as w, type CloseFyiResponse as x, type GetPayslipHeaderParams as y, type PayslipHeader as z };
|
|
@@ -216,6 +216,8 @@ interface SubmitSitRequestResponse {
|
|
|
216
216
|
itemKey: string;
|
|
217
217
|
}
|
|
218
218
|
interface GetSitHistoryParams {
|
|
219
|
+
sitName: string;
|
|
220
|
+
transactionId?: string;
|
|
219
221
|
startDate?: string;
|
|
220
222
|
endDate?: string;
|
|
221
223
|
}
|
|
@@ -234,52 +236,155 @@ declare class SitRequestsModule extends BaseClient {
|
|
|
234
236
|
getSegments(params: GetSitSegmentsParams): Promise<GetSitSegmentsResponse>;
|
|
235
237
|
saveAndPreview(input: SaveAndPreviewSitRequestInput): Promise<SaveAndPreviewSitRequestResponse>;
|
|
236
238
|
submit(input: SubmitSitRequestInput): Promise<SubmitSitRequestResponse>;
|
|
237
|
-
getHistory(params
|
|
239
|
+
getHistory(params: GetSitHistoryParams): Promise<GetSitHistoryResponse>;
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
interface Notification {
|
|
241
243
|
notificationId: string;
|
|
242
244
|
subject: string;
|
|
243
|
-
status
|
|
244
|
-
createdDate
|
|
245
|
+
status?: string;
|
|
246
|
+
createdDate?: string;
|
|
247
|
+
fromUser?: string;
|
|
248
|
+
beginDate?: string;
|
|
249
|
+
dueDate?: string | null;
|
|
250
|
+
notificationType?: 'FYI' | 'ACTION_REQUIRED';
|
|
245
251
|
itemKey?: string;
|
|
246
252
|
analysisCriteriaId?: string;
|
|
253
|
+
userId?: string;
|
|
254
|
+
[key: string]: any;
|
|
247
255
|
}
|
|
248
256
|
interface GetNotificationsResponse {
|
|
249
|
-
notifications
|
|
257
|
+
notifications?: Notification[];
|
|
258
|
+
[key: string]: any;
|
|
250
259
|
}
|
|
251
260
|
interface NotificationDetails {
|
|
252
|
-
notificationId
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
261
|
+
notificationId?: string;
|
|
262
|
+
itemKey?: string;
|
|
263
|
+
analysisCriteriaId?: string;
|
|
264
|
+
idFlexNum?: string;
|
|
265
|
+
title?: string;
|
|
266
|
+
description?: string;
|
|
267
|
+
status?: string;
|
|
268
|
+
createdDate?: string;
|
|
257
269
|
dueDate?: string;
|
|
270
|
+
userId?: string;
|
|
271
|
+
userName?: string;
|
|
272
|
+
action?: string;
|
|
273
|
+
lastUpdatedDate?: string;
|
|
274
|
+
comments?: string;
|
|
258
275
|
priority?: string;
|
|
276
|
+
notificationType?: string;
|
|
277
|
+
[key: string]: any;
|
|
259
278
|
}
|
|
260
279
|
interface GetNotificationDetailsParams {
|
|
261
280
|
notificationId: string;
|
|
262
281
|
}
|
|
282
|
+
interface GetAllDetailsParams {
|
|
283
|
+
notificationId: string;
|
|
284
|
+
itemKey: string;
|
|
285
|
+
analysisCriteriaId: string;
|
|
286
|
+
idFlexNum: string;
|
|
287
|
+
}
|
|
288
|
+
interface AllDetailsResponse {
|
|
289
|
+
itemKeyDetails?: {
|
|
290
|
+
itemType?: string;
|
|
291
|
+
itemKey?: string;
|
|
292
|
+
};
|
|
293
|
+
headerDetails?: {
|
|
294
|
+
transactionId?: string;
|
|
295
|
+
creatorPersonId?: string;
|
|
296
|
+
creatorPersonName?: string;
|
|
297
|
+
selectedPersonId?: string;
|
|
298
|
+
selectedPersonName?: string;
|
|
299
|
+
createdBy?: string;
|
|
300
|
+
createdByUserName?: string;
|
|
301
|
+
createdByPersonName?: string;
|
|
302
|
+
creationDate?: string;
|
|
303
|
+
lastUpdateDate?: string;
|
|
304
|
+
lastUpdatedBy?: string;
|
|
305
|
+
functionId?: string;
|
|
306
|
+
transactionRefTable?: string;
|
|
307
|
+
assignmentId?: string;
|
|
308
|
+
processName?: string;
|
|
309
|
+
};
|
|
310
|
+
stepDetails?: {
|
|
311
|
+
transactionStepId?: string;
|
|
312
|
+
transactionId?: string;
|
|
313
|
+
apiName?: string;
|
|
314
|
+
itemType?: string;
|
|
315
|
+
itemKey?: string;
|
|
316
|
+
activityId?: string;
|
|
317
|
+
};
|
|
318
|
+
segmentDetails?: Array<{
|
|
319
|
+
segmentNum?: string;
|
|
320
|
+
segmentName?: string;
|
|
321
|
+
segmentValue?: string;
|
|
322
|
+
}>;
|
|
323
|
+
[key: string]: any;
|
|
324
|
+
}
|
|
325
|
+
interface GetAbsenceDetailsParams {
|
|
326
|
+
itemKey: string;
|
|
327
|
+
}
|
|
328
|
+
interface AbsenceDetailsResponse {
|
|
329
|
+
absenceAttendanceId?: string;
|
|
330
|
+
businessGroupId?: string;
|
|
331
|
+
absenceAttendanceTypeId?: string;
|
|
332
|
+
absenceTypeName?: string;
|
|
333
|
+
personId?: string;
|
|
334
|
+
absenceDays?: string;
|
|
335
|
+
dateEnd?: string;
|
|
336
|
+
dateNotification?: string;
|
|
337
|
+
dateStart?: string;
|
|
338
|
+
attribute1?: string;
|
|
339
|
+
attribute2?: string;
|
|
340
|
+
attribute3?: string;
|
|
341
|
+
attribute4?: string;
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
}
|
|
344
|
+
interface GetActionHistoryParams {
|
|
345
|
+
notificationId: string;
|
|
346
|
+
}
|
|
347
|
+
interface ActionHistoryItem {
|
|
348
|
+
notificationId?: string;
|
|
349
|
+
action?: string;
|
|
350
|
+
actionDescription?: string;
|
|
351
|
+
performedBy?: string;
|
|
352
|
+
performedByName?: string;
|
|
353
|
+
actionDate?: string;
|
|
354
|
+
comments?: string;
|
|
355
|
+
[key: string]: any;
|
|
356
|
+
}
|
|
357
|
+
interface ActionHistoryResponse {
|
|
358
|
+
history?: ActionHistoryItem[];
|
|
359
|
+
[key: string]: any;
|
|
360
|
+
}
|
|
263
361
|
interface ProcessApprovalInput {
|
|
264
362
|
notificationId: string;
|
|
265
|
-
action: 'APPROVE' | '
|
|
363
|
+
action: 'APPROVE' | 'DECLINE';
|
|
266
364
|
comments?: string;
|
|
365
|
+
responderUserName?: string;
|
|
267
366
|
}
|
|
268
367
|
interface ProcessApprovalResponse {
|
|
269
|
-
status
|
|
270
|
-
message
|
|
368
|
+
status?: string;
|
|
369
|
+
message?: string;
|
|
370
|
+
errorMessage?: string;
|
|
371
|
+
[key: string]: any;
|
|
271
372
|
}
|
|
272
373
|
interface CloseFyiParams {
|
|
273
374
|
notificationId: string;
|
|
274
375
|
}
|
|
275
376
|
interface CloseFyiResponse {
|
|
276
|
-
status
|
|
277
|
-
message
|
|
377
|
+
status?: string;
|
|
378
|
+
message?: string;
|
|
379
|
+
[key: string]: any;
|
|
278
380
|
}
|
|
279
381
|
|
|
280
382
|
declare class NotificationsModule extends BaseClient {
|
|
281
383
|
getList(): Promise<GetNotificationsResponse>;
|
|
282
384
|
getDetails(params: GetNotificationDetailsParams): Promise<NotificationDetails>;
|
|
385
|
+
getAllDetails(params: GetAllDetailsParams): Promise<AllDetailsResponse>;
|
|
386
|
+
getAbsenceDetails(params: GetAbsenceDetailsParams): Promise<AbsenceDetailsResponse>;
|
|
387
|
+
getActionHistory(params: GetActionHistoryParams): Promise<ActionHistoryResponse>;
|
|
283
388
|
processApproval(input: ProcessApprovalInput): Promise<ProcessApprovalResponse>;
|
|
284
389
|
closeFyi(params: CloseFyiParams): Promise<CloseFyiResponse>;
|
|
285
390
|
}
|
|
@@ -345,7 +450,6 @@ interface GetPayslipRunBalancesResponse {
|
|
|
345
450
|
}
|
|
346
451
|
|
|
347
452
|
declare class PayslipModule extends BaseClient {
|
|
348
|
-
private getEmployeeNumberFromContext;
|
|
349
453
|
getHeader(params: GetPayslipHeaderParams): Promise<PayslipHeader>;
|
|
350
454
|
getDetails(params: GetPayslipDetailsParams): Promise<GetPayslipDetailsResponse>;
|
|
351
455
|
getLeaveDetails(params: GetPayslipLeaveDetailsParams): Promise<GetPayslipLeaveDetailsResponse>;
|
|
@@ -456,6 +560,142 @@ declare class HealthModule extends BaseClient {
|
|
|
456
560
|
ping(): Promise<string>;
|
|
457
561
|
}
|
|
458
562
|
|
|
563
|
+
declare enum MessageRole {
|
|
564
|
+
USER = "user",
|
|
565
|
+
ASSISTANT = "assistant",
|
|
566
|
+
SYSTEM = "system"
|
|
567
|
+
}
|
|
568
|
+
declare enum ActionType {
|
|
569
|
+
NAVIGATE = "navigate",
|
|
570
|
+
API_CALL = "api_call",
|
|
571
|
+
DOWNLOAD = "download",
|
|
572
|
+
CLOSE_NOTIFICATION = "close_notification",
|
|
573
|
+
SUBMIT_LEAVE = "submit_leave",
|
|
574
|
+
APPROVE_NOTIFICATION = "approve_notification",
|
|
575
|
+
DECLINE_NOTIFICATION = "decline_notification"
|
|
576
|
+
}
|
|
577
|
+
declare enum UserIntent {
|
|
578
|
+
NOTIFICATIONS_SUMMARY = "notifications_summary",
|
|
579
|
+
NOTIFICATION_CLOSE = "notification_close",
|
|
580
|
+
NOTIFICATION_ACTION = "notification_action",
|
|
581
|
+
PAYSLIP_QUERY = "payslip_query",
|
|
582
|
+
PAYSLIP_RETRIEVAL = "payslip_retrieval",
|
|
583
|
+
SALARY_DEDUCTION = "salary_deduction",
|
|
584
|
+
LEAVE_BALANCE = "leave_balance",
|
|
585
|
+
LEAVE_REQUEST = "leave_request",
|
|
586
|
+
PROFILE_INFO = "profile_info",
|
|
587
|
+
HIRING_DATE = "hiring_date",
|
|
588
|
+
POSITION_INFO = "position_info",
|
|
589
|
+
GENERAL_QUERY = "general_query",
|
|
590
|
+
OUT_OF_SCOPE = "out_of_scope"
|
|
591
|
+
}
|
|
592
|
+
interface ChatMessage {
|
|
593
|
+
role: MessageRole;
|
|
594
|
+
content: string;
|
|
595
|
+
}
|
|
596
|
+
interface CallToAction {
|
|
597
|
+
id: string;
|
|
598
|
+
label: string;
|
|
599
|
+
type: ActionType;
|
|
600
|
+
params?: Record<string, any>;
|
|
601
|
+
path?: string;
|
|
602
|
+
icon?: string;
|
|
603
|
+
variant?: 'default' | 'outline' | 'ghost' | 'destructive';
|
|
604
|
+
}
|
|
605
|
+
interface AiResponse {
|
|
606
|
+
message: string;
|
|
607
|
+
ctas?: CallToAction[];
|
|
608
|
+
metadata?: {
|
|
609
|
+
intent?: UserIntent;
|
|
610
|
+
model?: string;
|
|
611
|
+
tokensUsed?: number;
|
|
612
|
+
[key: string]: any;
|
|
613
|
+
};
|
|
614
|
+
requiresAction?: boolean;
|
|
615
|
+
chartData?: any;
|
|
616
|
+
threadId?: string;
|
|
617
|
+
}
|
|
618
|
+
interface ChatRequest {
|
|
619
|
+
message: string;
|
|
620
|
+
language?: 'en' | 'ar';
|
|
621
|
+
history?: ChatMessage[];
|
|
622
|
+
threadId?: string;
|
|
623
|
+
}
|
|
624
|
+
interface VoiceTranscription {
|
|
625
|
+
text: string;
|
|
626
|
+
language: string;
|
|
627
|
+
confidence?: number;
|
|
628
|
+
duration?: number;
|
|
629
|
+
}
|
|
630
|
+
interface VoiceResponse {
|
|
631
|
+
transcription: VoiceTranscription;
|
|
632
|
+
response: AiResponse;
|
|
633
|
+
}
|
|
634
|
+
interface ChatHistory {
|
|
635
|
+
id: string;
|
|
636
|
+
messages: Array<ChatMessage & {
|
|
637
|
+
timestamp: Date;
|
|
638
|
+
}>;
|
|
639
|
+
createdAt: Date;
|
|
640
|
+
updatedAt: Date;
|
|
641
|
+
}
|
|
642
|
+
interface ChatThread {
|
|
643
|
+
id: string;
|
|
644
|
+
userId: string;
|
|
645
|
+
username: string;
|
|
646
|
+
title: string | null;
|
|
647
|
+
status: string;
|
|
648
|
+
intent: string | null;
|
|
649
|
+
createdAt: Date;
|
|
650
|
+
updatedAt: Date;
|
|
651
|
+
lastMessageAt: Date;
|
|
652
|
+
messageCount: number;
|
|
653
|
+
}
|
|
654
|
+
interface ThreadMessage {
|
|
655
|
+
id: string;
|
|
656
|
+
threadId: string;
|
|
657
|
+
role: 'user' | 'assistant';
|
|
658
|
+
content: string;
|
|
659
|
+
metadata?: {
|
|
660
|
+
intent?: string;
|
|
661
|
+
ctas?: CallToAction[];
|
|
662
|
+
tokensUsed?: number;
|
|
663
|
+
[key: string]: any;
|
|
664
|
+
};
|
|
665
|
+
createdAt: Date;
|
|
666
|
+
}
|
|
667
|
+
interface GetThreadMessagesResponse {
|
|
668
|
+
thread: ChatThread;
|
|
669
|
+
messages: ThreadMessage[];
|
|
670
|
+
}
|
|
671
|
+
interface GetThreadsResponse {
|
|
672
|
+
threads: ChatThread[];
|
|
673
|
+
}
|
|
674
|
+
interface CreateThreadResponse {
|
|
675
|
+
thread: ChatThread;
|
|
676
|
+
}
|
|
677
|
+
interface DeleteThreadResponse {
|
|
678
|
+
success: boolean;
|
|
679
|
+
message: string;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare class AiModule extends BaseClient {
|
|
683
|
+
sendMessage(request: ChatRequest): Promise<AiResponse>;
|
|
684
|
+
sendVoice(audioBlob: Blob, options?: {
|
|
685
|
+
language?: 'en' | 'ar';
|
|
686
|
+
threadId?: string;
|
|
687
|
+
}): Promise<VoiceResponse>;
|
|
688
|
+
saveChatMessage(message: ChatMessage): void;
|
|
689
|
+
getLocalChatHistory(): Array<ChatMessage & {
|
|
690
|
+
timestamp: Date;
|
|
691
|
+
}>;
|
|
692
|
+
clearChatHistory(): void;
|
|
693
|
+
getChatThreads(): Promise<ChatThread[]>;
|
|
694
|
+
getThreadMessages(threadId: string): Promise<GetThreadMessagesResponse>;
|
|
695
|
+
createThread(): Promise<ChatThread>;
|
|
696
|
+
deleteThread(threadId: string): Promise<void>;
|
|
697
|
+
}
|
|
698
|
+
|
|
459
699
|
declare class OracleEBSClient {
|
|
460
700
|
readonly auth: AuthModule;
|
|
461
701
|
readonly leaves: LeavesModule;
|
|
@@ -466,6 +706,7 @@ declare class OracleEBSClient {
|
|
|
466
706
|
readonly accrualBalances: AccrualBalancesModule;
|
|
467
707
|
readonly forms: FormsModule;
|
|
468
708
|
readonly health: HealthModule;
|
|
709
|
+
readonly ai: AiModule;
|
|
469
710
|
constructor(config: OracleEBSConfig);
|
|
470
711
|
setToken(token: string, user?: {
|
|
471
712
|
userName?: string;
|
|
@@ -478,4 +719,4 @@ declare class OracleEBSClient {
|
|
|
478
719
|
clearToken(): void;
|
|
479
720
|
}
|
|
480
721
|
|
|
481
|
-
export { type APIResponse as A, type GetPayslipDetailsParams as B, type CacheOptions as C, type PayslipDetail as D, type GetPayslipDetailsResponse as E, type PersonalInformation as F, type GetAbsenceTypesParams as G, type EmployeeHierarchyNode as H, type GetEmployeeHierarchyResponse as I, type GetTableColumnsParams as J, type GetTableColumnsResponse as K, type LoginCredentials as L, type DffSegment as M, type Notification as N, OracleEBSClient as O, type ProcessApprovalInput as P, type GetDffSegmentsParams as Q, type RetryOptions as R, type SitSegment as S, type TableColumn as T, type UserContext as U, type GetDffSegmentsResponse as V, type HealthCheckResponse as W, type AccrualBalance as X, type GetAccrualBalancesParams as Y, type GetAccrualBalancesResponse as Z, type OracleEBSConfig as a, type LoginResponse as b, type Responsibility as c, type AbsenceType as d, type GetAbsenceTypesResponse as e, type LeaveHistoryRecord as f, type GetLeaveHistoryResponse as g, type CreateLeaveRequestInput as h, type CreateLeaveRequestResponse as i, type GetSitSegmentsParams as j, type GetSitSegmentsResponse as k, type SaveAndPreviewSitRequestInput as l, type SaveAndPreviewSitRequestResponse as m, type SubmitSitRequestInput as n, type SubmitSitRequestResponse as o, type GetSitHistoryParams as p, type SitHistoryRecord as q, type GetSitHistoryResponse as r, type GetNotificationsResponse as s, type NotificationDetails as t, type GetNotificationDetailsParams as u, type ProcessApprovalResponse as v, type CloseFyiParams as w, type CloseFyiResponse as x, type GetPayslipHeaderParams as y, type PayslipHeader as z };
|
|
722
|
+
export { ActionType as $, type APIResponse as A, type GetPayslipDetailsParams as B, type CacheOptions as C, type PayslipDetail as D, type GetPayslipDetailsResponse as E, type PersonalInformation as F, type GetAbsenceTypesParams as G, type EmployeeHierarchyNode as H, type GetEmployeeHierarchyResponse as I, type GetTableColumnsParams as J, type GetTableColumnsResponse as K, type LoginCredentials as L, type DffSegment as M, type Notification as N, OracleEBSClient as O, type ProcessApprovalInput as P, type GetDffSegmentsParams as Q, type RetryOptions as R, type SitSegment as S, type TableColumn as T, type UserContext as U, type GetDffSegmentsResponse as V, type HealthCheckResponse as W, type AccrualBalance as X, type GetAccrualBalancesParams as Y, type GetAccrualBalancesResponse as Z, MessageRole as _, type OracleEBSConfig as a, UserIntent as a0, type ChatMessage as a1, type CallToAction as a2, type AiResponse as a3, type ChatRequest as a4, type VoiceTranscription as a5, type VoiceResponse as a6, type ChatHistory as a7, type ChatThread as a8, type ThreadMessage as a9, type GetThreadMessagesResponse as aa, type GetThreadsResponse as ab, type CreateThreadResponse as ac, type DeleteThreadResponse as ad, type LoginResponse as b, type Responsibility as c, type AbsenceType as d, type GetAbsenceTypesResponse as e, type LeaveHistoryRecord as f, type GetLeaveHistoryResponse as g, type CreateLeaveRequestInput as h, type CreateLeaveRequestResponse as i, type GetSitSegmentsParams as j, type GetSitSegmentsResponse as k, type SaveAndPreviewSitRequestInput as l, type SaveAndPreviewSitRequestResponse as m, type SubmitSitRequestInput as n, type SubmitSitRequestResponse as o, type GetSitHistoryParams as p, type SitHistoryRecord as q, type GetSitHistoryResponse as r, type GetNotificationsResponse as s, type NotificationDetails as t, type GetNotificationDetailsParams as u, type ProcessApprovalResponse as v, type CloseFyiParams as w, type CloseFyiResponse as x, type GetPayslipHeaderParams as y, type PayslipHeader as z };
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
-
import { G as GetAbsenceTypesParams, j as GetSitSegmentsParams, Q as GetDffSegmentsParams, O as OracleEBSClient, b as LoginResponse, L as LoginCredentials, U as UserContext, e as GetAbsenceTypesResponse, g as GetLeaveHistoryResponse, i as CreateLeaveRequestResponse, h as CreateLeaveRequestInput, k as GetSitSegmentsResponse, m as SaveAndPreviewSitRequestResponse, l as SaveAndPreviewSitRequestInput, o as SubmitSitRequestResponse, n as SubmitSitRequestInput, s as GetNotificationsResponse, u as GetNotificationDetailsParams, t as NotificationDetails, v as ProcessApprovalResponse, P as ProcessApprovalInput, y as GetPayslipHeaderParams, z as PayslipHeader, B as GetPayslipDetailsParams, E as GetPayslipDetailsResponse, F as PersonalInformation, I as GetEmployeeHierarchyResponse, Y as GetAccrualBalancesParams, Z as GetAccrualBalancesResponse, J as GetTableColumnsParams, K as GetTableColumnsResponse, V as GetDffSegmentsResponse, W as HealthCheckResponse } from '../OracleEBSClient-
|
|
3
|
+
import { G as GetAbsenceTypesParams, j as GetSitSegmentsParams, Q as GetDffSegmentsParams, O as OracleEBSClient, b as LoginResponse, L as LoginCredentials, U as UserContext, e as GetAbsenceTypesResponse, g as GetLeaveHistoryResponse, i as CreateLeaveRequestResponse, h as CreateLeaveRequestInput, k as GetSitSegmentsResponse, m as SaveAndPreviewSitRequestResponse, l as SaveAndPreviewSitRequestInput, o as SubmitSitRequestResponse, n as SubmitSitRequestInput, s as GetNotificationsResponse, u as GetNotificationDetailsParams, t as NotificationDetails, v as ProcessApprovalResponse, P as ProcessApprovalInput, y as GetPayslipHeaderParams, z as PayslipHeader, B as GetPayslipDetailsParams, E as GetPayslipDetailsResponse, F as PersonalInformation, I as GetEmployeeHierarchyResponse, Y as GetAccrualBalancesParams, Z as GetAccrualBalancesResponse, J as GetTableColumnsParams, K as GetTableColumnsResponse, V as GetDffSegmentsResponse, W as HealthCheckResponse } from '../OracleEBSClient-BDnxW4cW.mjs';
|
|
4
4
|
import 'ky';
|
|
5
5
|
|
|
6
6
|
declare const queryKeys: {
|