gotrip-fx-transaction-form 1.0.299-dev → 1.0.301-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.299-dev",
3
+ "version": "1.0.301-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1,15 @@
1
+ type Props = {
2
+ /** Document to preview; null closes the dialog. */
3
+ documentId: number | null;
4
+ title: string;
5
+ onClose: () => void;
6
+ };
7
+ /**
8
+ * Shows the uploaded source file so an admin can check it against the chunks
9
+ * that were extracted from it.
10
+ *
11
+ * The file is fetched as a short-lived signed URL each time the dialog opens
12
+ * rather than being cached, since the URL expires after 30 minutes.
13
+ */
14
+ export declare const RagDocumentPreviewDialog: ({ documentId, title, onClose }: Props) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,4 @@
1
+ import { IRagDocument } from '../../types/rag';
2
+ type Props = Pick<IRagDocument, 'status' | 'progressStage' | 'progressCurrent' | 'progressTotal'>;
3
+ export declare const RagIngestProgress: ({ status, progressStage, progressCurrent, progressTotal, }: Props) => import("react/jsx-runtime").JSX.Element | null;
4
+ export {};
@@ -1,7 +1,13 @@
1
- import { ERagDocumentStatus, ERagEmbeddingStatus } from '../../types/rag';
1
+ import { ERagDocumentStatus, ERagEmbeddingStatus, ERagSourceType } from '../../types/rag';
2
2
  export declare const RagDocumentStatusBadge: ({ status }: {
3
3
  status: ERagDocumentStatus;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const RagEmbeddingStatusBadge: ({ status }: {
6
6
  status: ERagEmbeddingStatus;
7
7
  }) => import("react/jsx-runtime").JSX.Element;
8
+ /**
9
+ * File format of a source document.
10
+ */
11
+ export declare const RagSourceTypeBadge: ({ sourceType }: {
12
+ sourceType: ERagSourceType;
13
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ERagDocumentStatus, ERagQueryOutcome, IPaginated, IRagChunk, IRagDocument, IRagIndexHealth, IRagPreviewResult, IRagQueryLog, IRagSettings } from '../types/rag';
1
+ import { ERagDocumentStatus, ERagQueryOutcome, IPaginated, IRagChunk, IRagDocument, IRagDocumentFile, IRagIndexHealth, IRagPreviewResult, IRagQueryLog, IRagSettings } from '../types/rag';
2
2
  export declare const useRagAdmin: () => {
3
3
  listDocuments: (params: {
4
4
  page?: number;
@@ -8,6 +8,7 @@ export declare const useRagAdmin: () => {
8
8
  }) => Promise<IPaginated<IRagDocument>>;
9
9
  uploadDocument: (file: File, title?: string) => Promise<IRagDocument>;
10
10
  getDocument: (id: number) => Promise<IRagDocument>;
11
+ getDocumentFileUrl: (id: number) => Promise<IRagDocumentFile>;
11
12
  updateDocument: (id: number, changes: {
12
13
  title?: string;
13
14
  status?: ERagDocumentStatus;
@@ -1,6 +1 @@
1
- /**
2
- * Question log. The "Dưới ngưỡng" filter is the useful one day to day: it is
3
- * effectively the list of things customers ask that the knowledge base cannot
4
- * yet answer.
5
- */
6
1
  export declare const RagLogsPage: () => import("react/jsx-runtime").JSX.Element;
@@ -7,9 +7,16 @@ export declare enum ERagDocumentStatus {
7
7
  }
8
8
  export declare enum ERagSourceType {
9
9
  DOCX = "docx",
10
+ DOC = "doc",
10
11
  PDF = "pdf",
11
- MD = "md",
12
- TXT = "txt"
12
+ XLSX = "xlsx",
13
+ XLS = "xls"
14
+ }
15
+ export declare enum ERagIngestStage {
16
+ DOWNLOADING = "downloading",
17
+ PARSING = "parsing",
18
+ CHUNKING = "chunking",
19
+ EMBEDDING = "embedding"
13
20
  }
14
21
  export declare enum ERagEmbeddingStatus {
15
22
  PENDING = "pending",
@@ -34,6 +41,9 @@ export interface IRagDocument {
34
41
  status: ERagDocumentStatus;
35
42
  errorMessage: string | null;
36
43
  chunkCount: number;
44
+ progressStage: ERagIngestStage | null;
45
+ progressCurrent: number;
46
+ progressTotal: number;
37
47
  createdAt: string;
38
48
  updatedAt: string;
39
49
  }
@@ -102,6 +112,12 @@ export interface IRagIndexHealth {
102
112
  actualPoints: number | null;
103
113
  inSync: boolean;
104
114
  }
115
+ export interface IRagDocumentFile {
116
+ url: string;
117
+ expiresAt: number;
118
+ filename: string;
119
+ sourceType: ERagSourceType;
120
+ }
105
121
  export interface IPaginated<T> {
106
122
  data: T[];
107
123
  total: number;
@@ -0,0 +1,2 @@
1
+ import { ERagDocumentStatus } from '../types/rag';
2
+ export declare const isRagIngestInFlight: (status: ERagDocumentStatus) => status is ERagDocumentStatus.PENDING | ERagDocumentStatus.PROCESSING;