gotrip-fx-transaction-form 1.0.290-dev → 1.0.292-dev
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/assets/index.css +1 -1
- package/index.js +28237 -27765
- package/package.json +1 -1
- package/types/components/Chat/AdminChatPanel.d.ts +5 -0
- package/types/components/Chat/AdminOnlineToggle.d.ts +1 -0
- package/types/components/Chat/AdminSessionItem.d.ts +6 -0
- package/types/components/Chat/AdminSessionList.d.ts +1 -0
- package/types/components/Chat/ChatAvatar.d.ts +9 -0
- package/types/components/Chat/ChatButton.d.ts +1 -0
- package/types/components/Chat/ChatMessage.d.ts +9 -0
- package/types/components/Chat/ChatWidget.d.ts +1 -0
- package/types/components/Chat/ChatWindow.d.ts +1 -0
- package/types/components/Chat/OfflineMessageMode.d.ts +1 -0
- package/types/components/Chat/QueueStatus.d.ts +1 -0
- package/types/components/Chat/SessionInfoHeader.d.ts +10 -0
- package/types/components/Chat/TopicSelector.d.ts +6 -0
- package/types/components/Chat/TransferSessionModal.d.ts +9 -0
- package/types/components/Chat/TypingIndicator.d.ts +7 -0
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +16 -1
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +16 -1
- package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +2 -1
- package/types/constants/chat-constants.d.ts +3 -0
- package/types/hooks/transactions/useEducation.hook.d.ts +8 -8
- package/types/hooks/transactions/useImmigration.hook.d.ts +8 -8
- package/types/hooks/useChat.d.ts +24 -0
- package/types/hooks/useImportBookers.d.ts +18 -18
- package/types/hooks/useImportMembers.d.ts +18 -18
- package/types/pages/admin/chat/AdminChatPage.d.ts +1 -0
- package/types/store/useChatStore.d.ts +31 -0
- package/types/types/chat.d.ts +78 -0
- package/types/util/chat.d.ts +14 -0
- package/types/util/formatMessageTime.d.ts +1 -0
- package/types/util/formatWaitTime.d.ts +1 -0
- package/types/util/socket.d.ts +5 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare enum EChatTopic {
|
|
2
|
+
FX = "FX",
|
|
3
|
+
INSURANCE = "INSURANCE",
|
|
4
|
+
MOTOR_INSURANCE = "MOTOR_INSURANCE",
|
|
5
|
+
ESIM = "ESIM",
|
|
6
|
+
SIM = "SIM",
|
|
7
|
+
GENERAL = "GENERAL"
|
|
8
|
+
}
|
|
9
|
+
export declare enum EChatSessionStatus {
|
|
10
|
+
QUEUED = "queued",
|
|
11
|
+
ACTIVE = "active",
|
|
12
|
+
RESOLVED = "resolved",
|
|
13
|
+
OFFLINE_MESSAGE = "offline_message"
|
|
14
|
+
}
|
|
15
|
+
export declare enum EChatSenderType {
|
|
16
|
+
AGENCY = "agency",
|
|
17
|
+
ADMIN = "admin",
|
|
18
|
+
SYSTEM = "system"
|
|
19
|
+
}
|
|
20
|
+
export interface UserInfo {
|
|
21
|
+
id: number;
|
|
22
|
+
firstName?: string;
|
|
23
|
+
lastName?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TenantInfo {
|
|
27
|
+
id: number;
|
|
28
|
+
tenantName: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AdminInfo extends UserInfo {
|
|
31
|
+
isOnline?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface AgencyInfo extends UserInfo {
|
|
34
|
+
tenant?: TenantInfo;
|
|
35
|
+
isOnline?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface IChatSession {
|
|
38
|
+
id: number;
|
|
39
|
+
publicId: string;
|
|
40
|
+
agencyUserId: number;
|
|
41
|
+
agencyInfo?: AgencyInfo;
|
|
42
|
+
assignedAdminId: number | null;
|
|
43
|
+
adminInfo?: AdminInfo;
|
|
44
|
+
topic: EChatTopic;
|
|
45
|
+
status: EChatSessionStatus;
|
|
46
|
+
queuePosition: number | null;
|
|
47
|
+
resolvedAt: string | null;
|
|
48
|
+
lastActivityAt: string;
|
|
49
|
+
lastAgencyMessageAt: string | null | undefined;
|
|
50
|
+
agencyLastReadAt?: string | null;
|
|
51
|
+
adminLastReadAt?: string | null;
|
|
52
|
+
unreadCount?: number;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
waitTimeSeconds?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface SenderInfo {
|
|
57
|
+
id: number;
|
|
58
|
+
firstName?: string;
|
|
59
|
+
lastName?: string;
|
|
60
|
+
email?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface IChatMessage {
|
|
63
|
+
id: number;
|
|
64
|
+
sessionId: number;
|
|
65
|
+
senderId: number;
|
|
66
|
+
senderType: EChatSenderType;
|
|
67
|
+
senderInfo?: SenderInfo;
|
|
68
|
+
content: string;
|
|
69
|
+
messageType: 'text' | 'system_event';
|
|
70
|
+
createdAt: string;
|
|
71
|
+
}
|
|
72
|
+
export interface IAdminSupportProfile {
|
|
73
|
+
id: number;
|
|
74
|
+
adminUserId: number;
|
|
75
|
+
specialties: EChatTopic[];
|
|
76
|
+
maxConcurrent: number;
|
|
77
|
+
isOnline: boolean;
|
|
78
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ETenantType } from '../types/enum';
|
|
2
|
+
export declare const getAvatarColor: (userId: number) => string;
|
|
3
|
+
export declare const getAvatarInitials: (firstName?: string, lastName?: string) => string;
|
|
4
|
+
/** Join first + last name, falling back to `fallback` when both are empty. */
|
|
5
|
+
export declare const getFullName: (info?: {
|
|
6
|
+
firstName?: string;
|
|
7
|
+
lastName?: string;
|
|
8
|
+
} | null, fallback?: string) => string;
|
|
9
|
+
/** Whether the given user belongs to the internal (SYSTEM) tenant, i.e. an admin. */
|
|
10
|
+
export declare const isAdminUser: (user?: {
|
|
11
|
+
tenant?: {
|
|
12
|
+
type?: ETenantType;
|
|
13
|
+
} | null;
|
|
14
|
+
} | null) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatMessageTime: (dateString: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatWaitTime: (waitTimeSeconds?: number) => string;
|
package/types/util/socket.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Socket } from 'socket.io-client';
|
|
2
|
+
/**
|
|
3
|
+
* Request browser notification permission. Call from a user gesture
|
|
4
|
+
* (e.g. opening the chat widget or an admin going online).
|
|
5
|
+
*/
|
|
6
|
+
export declare const requestNotificationPermission: () => void;
|
|
2
7
|
/**
|
|
3
8
|
* Initialize Socket.IO connection with authentication token
|
|
4
9
|
*/
|