gotrip-fx-transaction-form 1.0.297-dev → 1.0.299-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/index.js +16304 -16279
- package/package.json +1 -1
- package/types/components/Insurance/FxInsuranceCouponBox.d.ts +8 -1
- package/types/components/Rag/RagStatusBadge.d.ts +7 -0
- package/types/hooks/useConfirmTransaction.d.ts +1 -0
- package/types/hooks/useCreateAutoCoupon.d.ts +5 -3
- package/types/hooks/useFxCrossSellEnabled.d.ts +1 -0
- package/types/hooks/useRagAdmin.d.ts +44 -0
- package/types/pages/admin/rag/RagDocumentDetailPage.d.ts +1 -0
- package/types/pages/admin/rag/RagDocumentListPage.d.ts +1 -0
- package/types/pages/admin/rag/RagLogsPage.d.ts +6 -0
- package/types/pages/admin/rag/RagPlaygroundPage.d.ts +1 -0
- package/types/types/chat.d.ts +13 -2
- package/types/types/rag.d.ts +110 -0
- package/types/types/response.dto.d.ts +1 -0
- package/types/types/user.d.ts +3 -1
- package/types/util/toast.d.ts +2 -0
package/package.json
CHANGED
|
@@ -5,6 +5,13 @@ interface FxInsuranceCouponBoxProps {
|
|
|
5
5
|
countryNameDes?: string | null;
|
|
6
6
|
discountPercent?: number;
|
|
7
7
|
maxDiscountAmount?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Code of the tenant that sold the FX order. Becomes the `utm_source` of the
|
|
10
|
+
* cross-sell links so an insurance order can be traced back to the exact
|
|
11
|
+
* tenant that referred it, not just to "an FX order". Falls back to `fx`
|
|
12
|
+
* when the backend could not resolve the tenant.
|
|
13
|
+
*/
|
|
14
|
+
tenantCode?: string | null;
|
|
8
15
|
}
|
|
9
|
-
export declare const FxInsuranceCouponBox: ({ couponCode, transactionPublicId, countryCodeDes, countryNameDes, discountPercent, maxDiscountAmount, }: FxInsuranceCouponBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const FxInsuranceCouponBox: ({ couponCode, transactionPublicId, countryCodeDes, countryNameDes, discountPercent, maxDiscountAmount, tenantCode, }: FxInsuranceCouponBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
17
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ERagDocumentStatus, ERagEmbeddingStatus } from '../../types/rag';
|
|
2
|
+
export declare const RagDocumentStatusBadge: ({ status }: {
|
|
3
|
+
status: ERagDocumentStatus;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const RagEmbeddingStatusBadge: ({ status }: {
|
|
6
|
+
status: ERagEmbeddingStatus;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export type AutoCouponResult = {
|
|
2
|
+
couponCode: string | null;
|
|
3
|
+
tenantCode: string | null;
|
|
4
|
+
};
|
|
1
5
|
export declare const useCreateAutoCoupon: () => {
|
|
2
|
-
createAutoCoupon: (publicId: string) => Promise<
|
|
3
|
-
couponCode: string | null;
|
|
4
|
-
}>;
|
|
6
|
+
createAutoCoupon: (publicId: string) => Promise<AutoCouponResult>;
|
|
5
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFxCrossSellEnabled: () => boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ERagDocumentStatus, ERagQueryOutcome, IPaginated, IRagChunk, IRagDocument, IRagIndexHealth, IRagPreviewResult, IRagQueryLog, IRagSettings } from '../types/rag';
|
|
2
|
+
export declare const useRagAdmin: () => {
|
|
3
|
+
listDocuments: (params: {
|
|
4
|
+
page?: number;
|
|
5
|
+
limit?: number;
|
|
6
|
+
status?: ERagDocumentStatus;
|
|
7
|
+
search?: string;
|
|
8
|
+
}) => Promise<IPaginated<IRagDocument>>;
|
|
9
|
+
uploadDocument: (file: File, title?: string) => Promise<IRagDocument>;
|
|
10
|
+
getDocument: (id: number) => Promise<IRagDocument>;
|
|
11
|
+
updateDocument: (id: number, changes: {
|
|
12
|
+
title?: string;
|
|
13
|
+
status?: ERagDocumentStatus;
|
|
14
|
+
}) => Promise<IRagDocument>;
|
|
15
|
+
deleteDocument: (id: number) => Promise<void>;
|
|
16
|
+
reindexDocument: (id: number) => Promise<void>;
|
|
17
|
+
reindexAll: () => Promise<void>;
|
|
18
|
+
listChunks: (documentId: number, params: {
|
|
19
|
+
page?: number;
|
|
20
|
+
limit?: number;
|
|
21
|
+
}) => Promise<IPaginated<IRagChunk>>;
|
|
22
|
+
updateChunk: (chunkId: number, changes: {
|
|
23
|
+
content?: string;
|
|
24
|
+
section?: string | null;
|
|
25
|
+
sensitive?: boolean;
|
|
26
|
+
}) => Promise<IRagChunk>;
|
|
27
|
+
deleteChunk: (chunkId: number) => Promise<void>;
|
|
28
|
+
preview: (question: string) => Promise<IRagPreviewResult>;
|
|
29
|
+
listLogs: (params: {
|
|
30
|
+
page?: number;
|
|
31
|
+
limit?: number;
|
|
32
|
+
outcome?: ERagQueryOutcome;
|
|
33
|
+
}) => Promise<IPaginated<IRagQueryLog>>;
|
|
34
|
+
getSettings: () => Promise<IRagSettings>;
|
|
35
|
+
updateRetrievalSettings: (changes: {
|
|
36
|
+
topK?: number;
|
|
37
|
+
minSimilarity?: number;
|
|
38
|
+
}) => Promise<any>;
|
|
39
|
+
updateGuardSettings: (changes: {
|
|
40
|
+
keywords?: string[];
|
|
41
|
+
patterns?: string[];
|
|
42
|
+
}) => Promise<any>;
|
|
43
|
+
getIndexHealth: () => Promise<IRagIndexHealth>;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RagDocumentDetailPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RagDocumentListPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RagPlaygroundPage: () => import("react/jsx-runtime").JSX.Element;
|
package/types/types/chat.d.ts
CHANGED
|
@@ -15,7 +15,14 @@ export declare enum EChatSessionStatus {
|
|
|
15
15
|
export declare enum EChatSenderType {
|
|
16
16
|
AGENCY = "agency",
|
|
17
17
|
ADMIN = "admin",
|
|
18
|
-
SYSTEM = "system"
|
|
18
|
+
SYSTEM = "system",
|
|
19
|
+
BOT = "bot"
|
|
20
|
+
}
|
|
21
|
+
export interface IChatCitation {
|
|
22
|
+
index: number;
|
|
23
|
+
title: string;
|
|
24
|
+
section?: string | null;
|
|
25
|
+
documentId: number;
|
|
19
26
|
}
|
|
20
27
|
export interface UserInfo {
|
|
21
28
|
id: number;
|
|
@@ -71,11 +78,15 @@ export interface IChatMedia {
|
|
|
71
78
|
export interface IChatMessage {
|
|
72
79
|
id: number;
|
|
73
80
|
sessionId: number;
|
|
74
|
-
senderId: number;
|
|
81
|
+
senderId: number | null;
|
|
75
82
|
senderType: EChatSenderType;
|
|
76
83
|
senderInfo?: SenderInfo;
|
|
77
84
|
content: string;
|
|
78
85
|
media?: IChatMedia[] | null;
|
|
86
|
+
metadata?: {
|
|
87
|
+
citations?: IChatCitation[];
|
|
88
|
+
ragQueryLogId?: number | null;
|
|
89
|
+
} | null;
|
|
79
90
|
messageType: 'text' | 'image' | 'system_event';
|
|
80
91
|
createdAt: string;
|
|
81
92
|
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export declare enum ERagDocumentStatus {
|
|
2
|
+
PENDING = "pending",
|
|
3
|
+
PROCESSING = "processing",
|
|
4
|
+
READY = "ready",
|
|
5
|
+
FAILED = "failed",
|
|
6
|
+
DISABLED = "disabled"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ERagSourceType {
|
|
9
|
+
DOCX = "docx",
|
|
10
|
+
PDF = "pdf",
|
|
11
|
+
MD = "md",
|
|
12
|
+
TXT = "txt"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ERagEmbeddingStatus {
|
|
15
|
+
PENDING = "pending",
|
|
16
|
+
INDEXED = "indexed",
|
|
17
|
+
SKIPPED_SENSITIVE = "skipped_sensitive",
|
|
18
|
+
FAILED = "failed"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ERagQueryOutcome {
|
|
21
|
+
ANSWERED = "answered",
|
|
22
|
+
LOW_CONFIDENCE = "low_confidence",
|
|
23
|
+
GUARD_BLOCKED = "guard_blocked",
|
|
24
|
+
TRUNCATED = "truncated",
|
|
25
|
+
RATE_LIMITED = "rate_limited",
|
|
26
|
+
ERROR = "error"
|
|
27
|
+
}
|
|
28
|
+
export interface IRagDocument {
|
|
29
|
+
id: number;
|
|
30
|
+
publicId: string;
|
|
31
|
+
title: string;
|
|
32
|
+
sourceType: ERagSourceType;
|
|
33
|
+
originalFilename: string;
|
|
34
|
+
status: ERagDocumentStatus;
|
|
35
|
+
errorMessage: string | null;
|
|
36
|
+
chunkCount: number;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IRagChunk {
|
|
41
|
+
id: number;
|
|
42
|
+
documentId: number;
|
|
43
|
+
chunkIndex: number;
|
|
44
|
+
section: string | null;
|
|
45
|
+
content: string;
|
|
46
|
+
tokenCount: number;
|
|
47
|
+
sensitive: boolean;
|
|
48
|
+
embeddingStatus: ERagEmbeddingStatus;
|
|
49
|
+
indexedAt: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface IRagQueryLog {
|
|
52
|
+
id: number;
|
|
53
|
+
sessionId: number | null;
|
|
54
|
+
question: string;
|
|
55
|
+
retrieved: Array<{
|
|
56
|
+
chunkId: number;
|
|
57
|
+
documentId: number;
|
|
58
|
+
score: number;
|
|
59
|
+
}>;
|
|
60
|
+
topScore: number | null;
|
|
61
|
+
model: string | null;
|
|
62
|
+
outcome: ERagQueryOutcome;
|
|
63
|
+
guardReason: string | null;
|
|
64
|
+
latencyMs: number | null;
|
|
65
|
+
cacheHit: boolean;
|
|
66
|
+
systemPrompt: string | null;
|
|
67
|
+
rawPrompt: string | null;
|
|
68
|
+
rawResponse: string | null;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
}
|
|
71
|
+
export interface IRagPreviewResult {
|
|
72
|
+
retrieved: Array<{
|
|
73
|
+
chunkId: number;
|
|
74
|
+
documentId: number;
|
|
75
|
+
documentTitle: string;
|
|
76
|
+
section: string | null;
|
|
77
|
+
score: number;
|
|
78
|
+
preview: string;
|
|
79
|
+
}>;
|
|
80
|
+
answer: string;
|
|
81
|
+
citations: Array<{
|
|
82
|
+
index: number;
|
|
83
|
+
title: string;
|
|
84
|
+
section: string | null;
|
|
85
|
+
}>;
|
|
86
|
+
outcome: ERagQueryOutcome;
|
|
87
|
+
}
|
|
88
|
+
export interface IRagSettings {
|
|
89
|
+
retrieval: {
|
|
90
|
+
topK: number;
|
|
91
|
+
minSimilarity: number;
|
|
92
|
+
};
|
|
93
|
+
guard: {
|
|
94
|
+
keywords: string[];
|
|
95
|
+
patterns: string[];
|
|
96
|
+
};
|
|
97
|
+
kbVersion: number;
|
|
98
|
+
}
|
|
99
|
+
export interface IRagIndexHealth {
|
|
100
|
+
vectorStoreReachable: boolean;
|
|
101
|
+
expectedPoints: number;
|
|
102
|
+
actualPoints: number | null;
|
|
103
|
+
inSync: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface IPaginated<T> {
|
|
106
|
+
data: T[];
|
|
107
|
+
total: number;
|
|
108
|
+
page: number;
|
|
109
|
+
limit: number;
|
|
110
|
+
}
|
package/types/types/user.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare enum EPermissionKey {
|
|
|
62
62
|
SEND_EMAILS_TO_CUSTOMER = "SEND_EMAILS_TO_CUSTOMER",
|
|
63
63
|
VIEW_SENT_EMAIL_HISTORY = "VIEW_SENT_EMAIL_HISTORY",
|
|
64
64
|
SEND_EMAIL = "SEND_EMAIL",
|
|
65
|
+
CHAT_SUPPORT = "CHAT_SUPPORT",
|
|
65
66
|
VIEW_DEBT_REPORT_LIST = "VIEW_DEBT_REPORT_LIST",
|
|
66
67
|
VIEW_DEBT_REPORT_DETAIL = "VIEW_DEBT_REPORT_DETAIL",
|
|
67
68
|
UPDATE_DEBT_REPORT = "UPDATE_DEBT_REPORT",
|
|
@@ -72,5 +73,6 @@ export declare enum EPermissionKey {
|
|
|
72
73
|
CREATE_INSURANCE_ORDER = "CREATE_INSURANCE_ORDER",
|
|
73
74
|
VIEW_INSURANCE_LIST = "VIEW_INSURANCE_LIST",
|
|
74
75
|
UPDATE_INSURANCE_ORDER = "UPDATE_INSURANCE_ORDER",
|
|
75
|
-
VIEW_INSURANCE_DETAIL = "VIEW_INSURANCE_DETAIL"
|
|
76
|
+
VIEW_INSURANCE_DETAIL = "VIEW_INSURANCE_DETAIL",
|
|
77
|
+
RAG_ADMIN = "RAG_ADMIN"
|
|
76
78
|
}
|
package/types/util/toast.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare const showSuccessToast: (message: string, duration?: number) => void;
|
|
2
|
+
export declare const showErrorToast: (message: string, duration?: number) => void;
|
|
1
3
|
export declare const showToast: (message: string, type: "success" | "error" | "info", duration?: number, options?: {
|
|
2
4
|
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
3
5
|
title?: string;
|