@@ -30,18 +30,13 @@ export interface CustomFileBase extends Partial<globalThis.File> {
30
30
}
31
31
export interface CustomFile extends CustomFileBase {
32
32
id : string ;
33
- // total_pages: number | 'N/A';
34
33
}
35
34
36
35
export interface OptionType {
37
36
readonly value : string ;
38
37
readonly label : string ;
39
38
}
40
39
41
- export interface OptionTypeForExamples {
42
- readonly value : string ;
43
- readonly label : string ;
44
- }
45
40
46
41
export type UserCredentials = {
47
42
uri : string ;
@@ -50,14 +45,27 @@ export type UserCredentials = {
50
45
database : string ;
51
46
} & { [ key : string ] : any } ;
52
47
53
- export type ExtractParams = {
48
+ export interface SourceNode extends Omit < CustomFileBase , 'relationshipCount' > {
49
+ fileName : string ;
50
+ fileSize : number ;
51
+ fileType : string ;
52
+ nodeCount ?: number ;
53
+ processingTime ?: string ;
54
+ relationshipCount ?: number ;
55
+ url ?: string ;
56
+ awsAccessKeyId ?: string ;
57
+ uploadprogress ?: number ;
58
+ gcsProjectId ?: string ;
59
+ processed_chunk ?: number ;
60
+ total_chunks ?: number ;
61
+ retry_condition ?: string ;
62
+ }
63
+
64
+ export type ExtractParams = Pick < CustomFile , 'wiki_query' | 'model' | 'source_url' | 'language' | 'access_token' > & {
54
65
file ?: File ;
55
- model : string ;
56
- source_url ?: string ;
57
66
aws_access_key_id ?: string | null ;
58
67
aws_secret_access_key ?: string | null ;
59
68
max_sources ?: number ;
60
- wiki_query ?: string ;
61
69
gcs_bucket_name ?: string ;
62
70
gcs_bucket_folder ?: string ;
63
71
gcs_blob_filename ?: string ;
@@ -66,10 +74,8 @@ export type ExtractParams = {
66
74
allowedNodes ?: string [ ] ;
67
75
allowedRelationship ?: string [ ] ;
68
76
gcs_project_id ?: string ;
69
- language ?: string ;
70
- access_token ?: string ;
71
77
retry_condition : string ;
72
- } & { [ key : string ] : any } ;
78
+ } & { [ key : string ] : any }
73
79
74
80
export type UploadParams = {
75
81
file : Blob ;
@@ -100,36 +106,11 @@ export interface S3ModalProps {
100
106
hideModal : ( ) => void ;
101
107
open : boolean ;
102
108
}
103
- export interface GCSModalProps {
104
- hideModal : ( ) => void ;
105
- open : boolean ;
109
+ export interface GCSModalProps extends Omit < S3ModalProps , '' > {
106
110
openGCSModal : ( ) => void ;
107
111
}
108
112
109
- export interface SourceNode {
110
- fileName : string ;
111
- fileSize : number ;
112
- fileType : string ;
113
- nodeCount ?: number ;
114
- processingTime ?: string ;
115
- relationshipCount ?: number ;
116
- model : string ;
117
- status : string ;
118
- url ?: string ;
119
- awsAccessKeyId ?: string ;
120
- fileSource : string ;
121
- gcsBucket ?: string ;
122
- gcsBucketFolder ?: string ;
123
- errorMessage ?: string ;
124
- uploadprogress ?: number ;
125
- gcsProjectId ?: string ;
126
- language ?: string ;
127
- processed_chunk ?: number ;
128
- total_chunks ?: number ;
129
- // total_pages?: number;
130
- access_token ?: string ;
131
- retry_condition ?: string ;
132
- }
113
+
133
114
134
115
export interface SideNavProps {
135
116
isExpanded : boolean ;
@@ -254,9 +235,7 @@ export type ChatbotProps = {
254
235
clear ?: boolean ;
255
236
isFullScreen ?: boolean ;
256
237
} ;
257
- export interface WikipediaModalTypes {
258
- hideModal : ( ) => void ;
259
- open : boolean ;
238
+ export interface WikipediaModalTypes extends Omit < S3ModalProps , '' > {
260
239
}
261
240
262
241
export interface GraphViewModalProps {
@@ -346,10 +325,8 @@ export type alertStateType = {
346
325
alertType : OverridableStringUnion < AlertColor , AlertPropsColorOverrides > | undefined ;
347
326
alertMessage : string ;
348
327
} ;
349
- export interface BannerAlertProps {
350
- showAlert : boolean ;
328
+ export interface BannerAlertProps extends Omit < alertStateType , 'alertType' > {
351
329
alertType : BannerType ;
352
- alertMessage : string ;
353
330
}
354
331
export type Scheme = Record < string , string > ;
355
332
@@ -446,19 +423,11 @@ export interface chatInfoMessage extends Partial<Messages> {
446
423
error : string ;
447
424
}
448
425
449
- export interface eventResponsetypes {
450
- fileName : string ;
451
- status : string ;
452
- processingTime : number ;
453
- nodeCount : number ;
454
- relationshipCount : number ;
455
- model : string ;
426
+ export interface eventResponsetypes extends Omit < SourceNode , 'total_chunks' | 'processingTime' > {
456
427
total_chunks : number | null ;
457
- // total_pages: number;
458
- fileSize : number ;
459
- processed_chunk ?: number ;
460
- fileSource : string ;
428
+ processingTime :number
461
429
}
430
+
462
431
export type Nullable < Type > = Type | null ;
463
432
464
433
export type LabelColors = 'default' | 'success' | 'info' | 'warning' | 'danger' | undefined ;
@@ -680,4 +649,4 @@ export interface ContextProps {
680
649
export interface MessageContextType {
681
650
messages : Messages [ ] | [ ] ;
682
651
setMessages : Dispatch < SetStateAction < Messages [ ] > > ;
683
- }
652
+ }
0 commit comments