@juspay/neurolink 9.1.1 → 9.2.0
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/CHANGELOG.md +6 -0
- package/README.md +54 -7
- package/dist/agent/directTools.d.ts +3 -3
- package/dist/cli/commands/config.d.ts +6 -6
- package/dist/image-gen/ImageGenService.d.ts +143 -0
- package/dist/image-gen/ImageGenService.js +345 -0
- package/dist/image-gen/imageGenTools.d.ts +126 -0
- package/dist/image-gen/imageGenTools.js +304 -0
- package/dist/image-gen/index.d.ts +46 -0
- package/dist/image-gen/index.js +48 -0
- package/dist/image-gen/types.d.ts +237 -0
- package/dist/image-gen/types.js +24 -0
- package/dist/lib/agent/directTools.d.ts +3 -3
- package/dist/lib/image-gen/ImageGenService.d.ts +143 -0
- package/dist/lib/image-gen/ImageGenService.js +346 -0
- package/dist/lib/image-gen/imageGenTools.d.ts +126 -0
- package/dist/lib/image-gen/imageGenTools.js +305 -0
- package/dist/lib/image-gen/index.d.ts +46 -0
- package/dist/lib/image-gen/index.js +49 -0
- package/dist/lib/image-gen/types.d.ts +237 -0
- package/dist/lib/image-gen/types.js +25 -0
- package/dist/lib/processors/base/BaseFileProcessor.d.ts +273 -0
- package/dist/lib/processors/base/BaseFileProcessor.js +614 -0
- package/dist/lib/processors/base/index.d.ts +14 -0
- package/dist/lib/processors/base/index.js +20 -0
- package/dist/lib/processors/base/types.d.ts +593 -0
- package/dist/lib/processors/base/types.js +77 -0
- package/dist/lib/processors/cli/fileProcessorCli.d.ts +163 -0
- package/dist/lib/processors/cli/fileProcessorCli.js +389 -0
- package/dist/lib/processors/cli/index.d.ts +37 -0
- package/dist/lib/processors/cli/index.js +50 -0
- package/dist/lib/processors/code/ConfigProcessor.d.ts +171 -0
- package/dist/lib/processors/code/ConfigProcessor.js +401 -0
- package/dist/lib/processors/code/SourceCodeProcessor.d.ts +174 -0
- package/dist/lib/processors/code/SourceCodeProcessor.js +305 -0
- package/dist/lib/processors/code/index.d.ts +44 -0
- package/dist/lib/processors/code/index.js +61 -0
- package/dist/lib/processors/config/fileTypes.d.ts +283 -0
- package/dist/lib/processors/config/fileTypes.js +521 -0
- package/dist/lib/processors/config/index.d.ts +32 -0
- package/dist/lib/processors/config/index.js +93 -0
- package/dist/lib/processors/config/languageMap.d.ts +66 -0
- package/dist/lib/processors/config/languageMap.js +411 -0
- package/dist/lib/processors/config/mimeTypes.d.ts +376 -0
- package/dist/lib/processors/config/mimeTypes.js +339 -0
- package/dist/lib/processors/config/sizeLimits.d.ts +194 -0
- package/dist/lib/processors/config/sizeLimits.js +247 -0
- package/dist/lib/processors/data/JsonProcessor.d.ts +122 -0
- package/dist/lib/processors/data/JsonProcessor.js +204 -0
- package/dist/lib/processors/data/XmlProcessor.d.ts +160 -0
- package/dist/lib/processors/data/XmlProcessor.js +284 -0
- package/dist/lib/processors/data/YamlProcessor.d.ts +163 -0
- package/dist/lib/processors/data/YamlProcessor.js +295 -0
- package/dist/lib/processors/data/index.d.ts +49 -0
- package/dist/lib/processors/data/index.js +77 -0
- package/dist/lib/processors/document/ExcelProcessor.d.ts +238 -0
- package/dist/lib/processors/document/ExcelProcessor.js +520 -0
- package/dist/lib/processors/document/OpenDocumentProcessor.d.ts +69 -0
- package/dist/lib/processors/document/OpenDocumentProcessor.js +211 -0
- package/dist/lib/processors/document/RtfProcessor.d.ts +152 -0
- package/dist/lib/processors/document/RtfProcessor.js +362 -0
- package/dist/lib/processors/document/WordProcessor.d.ts +168 -0
- package/dist/lib/processors/document/WordProcessor.js +354 -0
- package/dist/lib/processors/document/index.d.ts +54 -0
- package/dist/lib/processors/document/index.js +91 -0
- package/dist/lib/processors/errors/FileErrorCode.d.ts +98 -0
- package/dist/lib/processors/errors/FileErrorCode.js +256 -0
- package/dist/lib/processors/errors/errorHelpers.d.ts +151 -0
- package/dist/lib/processors/errors/errorHelpers.js +379 -0
- package/dist/lib/processors/errors/errorSerializer.d.ts +139 -0
- package/dist/lib/processors/errors/errorSerializer.js +508 -0
- package/dist/lib/processors/errors/index.d.ts +46 -0
- package/dist/lib/processors/errors/index.js +50 -0
- package/dist/lib/processors/index.d.ts +76 -0
- package/dist/lib/processors/index.js +113 -0
- package/dist/lib/processors/integration/FileProcessorIntegration.d.ts +244 -0
- package/dist/lib/processors/integration/FileProcessorIntegration.js +273 -0
- package/dist/lib/processors/integration/index.d.ts +42 -0
- package/dist/lib/processors/integration/index.js +45 -0
- package/dist/lib/processors/markup/HtmlProcessor.d.ts +169 -0
- package/dist/lib/processors/markup/HtmlProcessor.js +250 -0
- package/dist/lib/processors/markup/MarkdownProcessor.d.ts +165 -0
- package/dist/lib/processors/markup/MarkdownProcessor.js +245 -0
- package/dist/lib/processors/markup/SvgProcessor.d.ts +156 -0
- package/dist/lib/processors/markup/SvgProcessor.js +241 -0
- package/dist/lib/processors/markup/TextProcessor.d.ts +135 -0
- package/dist/lib/processors/markup/TextProcessor.js +189 -0
- package/dist/lib/processors/markup/index.d.ts +66 -0
- package/dist/lib/processors/markup/index.js +103 -0
- package/dist/lib/processors/registry/ProcessorRegistry.d.ts +334 -0
- package/dist/lib/processors/registry/ProcessorRegistry.js +609 -0
- package/dist/lib/processors/registry/index.d.ts +12 -0
- package/dist/lib/processors/registry/index.js +17 -0
- package/dist/lib/processors/registry/types.d.ts +53 -0
- package/dist/lib/processors/registry/types.js +11 -0
- package/dist/lib/providers/sagemaker/language-model.d.ts +2 -2
- package/dist/lib/server/utils/validation.d.ts +6 -6
- package/dist/lib/types/fileTypes.d.ts +1 -1
- package/dist/lib/types/index.d.ts +25 -24
- package/dist/lib/types/index.js +21 -20
- package/dist/lib/types/modelTypes.d.ts +18 -18
- package/dist/lib/types/pptTypes.d.ts +14 -2
- package/dist/lib/types/pptTypes.js +16 -0
- package/dist/lib/utils/async/delay.d.ts +40 -0
- package/dist/lib/utils/async/delay.js +43 -0
- package/dist/lib/utils/async/index.d.ts +23 -0
- package/dist/lib/utils/async/index.js +24 -0
- package/dist/lib/utils/async/retry.d.ts +141 -0
- package/dist/lib/utils/async/retry.js +172 -0
- package/dist/lib/utils/async/withTimeout.d.ts +73 -0
- package/dist/lib/utils/async/withTimeout.js +97 -0
- package/dist/lib/utils/fileDetector.d.ts +7 -1
- package/dist/lib/utils/fileDetector.js +91 -18
- package/dist/lib/utils/json/extract.d.ts +103 -0
- package/dist/lib/utils/json/extract.js +249 -0
- package/dist/lib/utils/json/index.d.ts +36 -0
- package/dist/lib/utils/json/index.js +37 -0
- package/dist/lib/utils/json/safeParse.d.ts +137 -0
- package/dist/lib/utils/json/safeParse.js +191 -0
- package/dist/lib/utils/messageBuilder.d.ts +2 -2
- package/dist/lib/utils/messageBuilder.js +15 -7
- package/dist/lib/utils/sanitizers/filename.d.ts +137 -0
- package/dist/lib/utils/sanitizers/filename.js +366 -0
- package/dist/lib/utils/sanitizers/html.d.ts +170 -0
- package/dist/lib/utils/sanitizers/html.js +326 -0
- package/dist/lib/utils/sanitizers/index.d.ts +26 -0
- package/dist/lib/utils/sanitizers/index.js +30 -0
- package/dist/lib/utils/sanitizers/svg.d.ts +81 -0
- package/dist/lib/utils/sanitizers/svg.js +483 -0
- package/dist/processors/base/BaseFileProcessor.d.ts +273 -0
- package/dist/processors/base/BaseFileProcessor.js +613 -0
- package/dist/processors/base/index.d.ts +14 -0
- package/dist/processors/base/index.js +19 -0
- package/dist/processors/base/types.d.ts +593 -0
- package/dist/processors/base/types.js +76 -0
- package/dist/processors/cli/fileProcessorCli.d.ts +163 -0
- package/dist/processors/cli/fileProcessorCli.js +388 -0
- package/dist/processors/cli/index.d.ts +37 -0
- package/dist/processors/cli/index.js +49 -0
- package/dist/processors/code/ConfigProcessor.d.ts +171 -0
- package/dist/processors/code/ConfigProcessor.js +400 -0
- package/dist/processors/code/SourceCodeProcessor.d.ts +174 -0
- package/dist/processors/code/SourceCodeProcessor.js +304 -0
- package/dist/processors/code/index.d.ts +44 -0
- package/dist/processors/code/index.js +60 -0
- package/dist/processors/config/fileTypes.d.ts +283 -0
- package/dist/processors/config/fileTypes.js +520 -0
- package/dist/processors/config/index.d.ts +32 -0
- package/dist/processors/config/index.js +92 -0
- package/dist/processors/config/languageMap.d.ts +66 -0
- package/dist/processors/config/languageMap.js +410 -0
- package/dist/processors/config/mimeTypes.d.ts +376 -0
- package/dist/processors/config/mimeTypes.js +338 -0
- package/dist/processors/config/sizeLimits.d.ts +194 -0
- package/dist/processors/config/sizeLimits.js +246 -0
- package/dist/processors/data/JsonProcessor.d.ts +122 -0
- package/dist/processors/data/JsonProcessor.js +203 -0
- package/dist/processors/data/XmlProcessor.d.ts +160 -0
- package/dist/processors/data/XmlProcessor.js +283 -0
- package/dist/processors/data/YamlProcessor.d.ts +163 -0
- package/dist/processors/data/YamlProcessor.js +294 -0
- package/dist/processors/data/index.d.ts +49 -0
- package/dist/processors/data/index.js +76 -0
- package/dist/processors/document/ExcelProcessor.d.ts +238 -0
- package/dist/processors/document/ExcelProcessor.js +519 -0
- package/dist/processors/document/OpenDocumentProcessor.d.ts +69 -0
- package/dist/processors/document/OpenDocumentProcessor.js +210 -0
- package/dist/processors/document/RtfProcessor.d.ts +152 -0
- package/dist/processors/document/RtfProcessor.js +361 -0
- package/dist/processors/document/WordProcessor.d.ts +168 -0
- package/dist/processors/document/WordProcessor.js +353 -0
- package/dist/processors/document/index.d.ts +54 -0
- package/dist/processors/document/index.js +90 -0
- package/dist/processors/errors/FileErrorCode.d.ts +98 -0
- package/dist/processors/errors/FileErrorCode.js +255 -0
- package/dist/processors/errors/errorHelpers.d.ts +151 -0
- package/dist/processors/errors/errorHelpers.js +378 -0
- package/dist/processors/errors/errorSerializer.d.ts +139 -0
- package/dist/processors/errors/errorSerializer.js +507 -0
- package/dist/processors/errors/index.d.ts +46 -0
- package/dist/processors/errors/index.js +49 -0
- package/dist/processors/index.d.ts +76 -0
- package/dist/processors/index.js +112 -0
- package/dist/processors/integration/FileProcessorIntegration.d.ts +244 -0
- package/dist/processors/integration/FileProcessorIntegration.js +272 -0
- package/dist/processors/integration/index.d.ts +42 -0
- package/dist/processors/integration/index.js +44 -0
- package/dist/processors/markup/HtmlProcessor.d.ts +169 -0
- package/dist/processors/markup/HtmlProcessor.js +249 -0
- package/dist/processors/markup/MarkdownProcessor.d.ts +165 -0
- package/dist/processors/markup/MarkdownProcessor.js +244 -0
- package/dist/processors/markup/SvgProcessor.d.ts +156 -0
- package/dist/processors/markup/SvgProcessor.js +240 -0
- package/dist/processors/markup/TextProcessor.d.ts +135 -0
- package/dist/processors/markup/TextProcessor.js +188 -0
- package/dist/processors/markup/index.d.ts +66 -0
- package/dist/processors/markup/index.js +102 -0
- package/dist/processors/registry/ProcessorRegistry.d.ts +334 -0
- package/dist/processors/registry/ProcessorRegistry.js +608 -0
- package/dist/processors/registry/index.d.ts +12 -0
- package/dist/processors/registry/index.js +16 -0
- package/dist/processors/registry/types.d.ts +53 -0
- package/dist/processors/registry/types.js +10 -0
- package/dist/server/utils/validation.d.ts +6 -6
- package/dist/types/fileTypes.d.ts +1 -1
- package/dist/types/index.d.ts +25 -24
- package/dist/types/index.js +21 -20
- package/dist/types/modelTypes.d.ts +10 -10
- package/dist/types/pptTypes.d.ts +14 -2
- package/dist/types/pptTypes.js +16 -0
- package/dist/utils/async/delay.d.ts +40 -0
- package/dist/utils/async/delay.js +42 -0
- package/dist/utils/async/index.d.ts +23 -0
- package/dist/utils/async/index.js +23 -0
- package/dist/utils/async/retry.d.ts +141 -0
- package/dist/utils/async/retry.js +171 -0
- package/dist/utils/async/withTimeout.d.ts +73 -0
- package/dist/utils/async/withTimeout.js +96 -0
- package/dist/utils/fileDetector.d.ts +7 -1
- package/dist/utils/fileDetector.js +91 -18
- package/dist/utils/json/extract.d.ts +103 -0
- package/dist/utils/json/extract.js +248 -0
- package/dist/utils/json/index.d.ts +36 -0
- package/dist/utils/json/index.js +36 -0
- package/dist/utils/json/safeParse.d.ts +137 -0
- package/dist/utils/json/safeParse.js +190 -0
- package/dist/utils/messageBuilder.d.ts +2 -2
- package/dist/utils/messageBuilder.js +15 -7
- package/dist/utils/sanitizers/filename.d.ts +137 -0
- package/dist/utils/sanitizers/filename.js +365 -0
- package/dist/utils/sanitizers/html.d.ts +170 -0
- package/dist/utils/sanitizers/html.js +325 -0
- package/dist/utils/sanitizers/index.d.ts +26 -0
- package/dist/utils/sanitizers/index.js +29 -0
- package/dist/utils/sanitizers/svg.d.ts +81 -0
- package/dist/utils/sanitizers/svg.js +482 -0
- package/package.json +2 -2
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Processor Types
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for ALL file processing type definitions.
|
|
5
|
+
* All processor infrastructure, registry, and SDK types are defined here.
|
|
6
|
+
*
|
|
7
|
+
* @module processors/base/types
|
|
8
|
+
*/
|
|
9
|
+
import type { FileErrorCode } from "../errors/FileErrorCode.js";
|
|
10
|
+
/**
|
|
11
|
+
* Generic file information - provider agnostic.
|
|
12
|
+
* Replaces Slack-specific SlackFileInfo with a universal interface.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const fileInfo: FileInfo = {
|
|
17
|
+
* id: 'doc-123',
|
|
18
|
+
* name: 'report.pdf',
|
|
19
|
+
* mimetype: 'application/pdf',
|
|
20
|
+
* size: 1024000,
|
|
21
|
+
* url: 'https://example.com/files/report.pdf',
|
|
22
|
+
* };
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export interface FileInfo {
|
|
26
|
+
/** Unique identifier for the file */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Original filename */
|
|
29
|
+
name: string;
|
|
30
|
+
/** MIME type of the file */
|
|
31
|
+
mimetype: string;
|
|
32
|
+
/** File size in bytes */
|
|
33
|
+
size: number;
|
|
34
|
+
/** Download URL (optional - use when file needs to be fetched) */
|
|
35
|
+
url?: string;
|
|
36
|
+
/** Direct file content (optional - use when file is already in memory) */
|
|
37
|
+
buffer?: Buffer;
|
|
38
|
+
/** Extensibility - additional provider-specific metadata */
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Configuration for file processors.
|
|
43
|
+
* Defines constraints and defaults for a specific file type processor.
|
|
44
|
+
*/
|
|
45
|
+
export interface FileProcessorConfig {
|
|
46
|
+
/** Maximum file size in megabytes */
|
|
47
|
+
maxSizeMB: number;
|
|
48
|
+
/** Download/processing timeout in milliseconds */
|
|
49
|
+
timeoutMs: number;
|
|
50
|
+
/** List of supported MIME types */
|
|
51
|
+
supportedMimeTypes: string[];
|
|
52
|
+
/** List of supported file extensions (with leading dot) */
|
|
53
|
+
supportedExtensions: string[];
|
|
54
|
+
/** Human-readable name for this file type (e.g., 'image', 'PDF') */
|
|
55
|
+
fileTypeName: string;
|
|
56
|
+
/** Default filename when original name is not available */
|
|
57
|
+
defaultFilename: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Base interface for processed file data.
|
|
61
|
+
* All specific processed types should extend this interface.
|
|
62
|
+
*/
|
|
63
|
+
export interface ProcessedFileBase {
|
|
64
|
+
/** File content as a Buffer */
|
|
65
|
+
buffer: Buffer;
|
|
66
|
+
/** MIME type of the processed content */
|
|
67
|
+
mimetype: string;
|
|
68
|
+
/** Size of the processed content in bytes */
|
|
69
|
+
size: number;
|
|
70
|
+
/** Filename (may be normalized or sanitized) */
|
|
71
|
+
filename: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Structured file processing error with user-friendly messaging.
|
|
75
|
+
* This is the canonical error type used across all processor infrastructure.
|
|
76
|
+
*/
|
|
77
|
+
export interface FileProcessingError {
|
|
78
|
+
/** Error code from FileErrorCode enum */
|
|
79
|
+
code: FileErrorCode | string;
|
|
80
|
+
/** Technical error message */
|
|
81
|
+
message: string;
|
|
82
|
+
/** User-friendly error message */
|
|
83
|
+
userMessage: string;
|
|
84
|
+
/** Suggested action to resolve the error */
|
|
85
|
+
suggestedAction?: string;
|
|
86
|
+
/** Whether this error is potentially retryable */
|
|
87
|
+
retryable?: boolean;
|
|
88
|
+
/** Additional context/details about the error */
|
|
89
|
+
details?: Record<string, unknown>;
|
|
90
|
+
/** Technical details (usually from original error) */
|
|
91
|
+
technicalDetails?: string;
|
|
92
|
+
/** Original error that caused this failure */
|
|
93
|
+
originalError?: Error;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Generic result type for internal operations.
|
|
97
|
+
* Used for validation and download operations that don't return ProcessedFileBase.
|
|
98
|
+
*/
|
|
99
|
+
export interface OperationResult<T = void> {
|
|
100
|
+
/** Whether the operation was successful */
|
|
101
|
+
success: boolean;
|
|
102
|
+
/** Operation result data (present when success is true) */
|
|
103
|
+
data?: T;
|
|
104
|
+
/** Error information (present when success is false) */
|
|
105
|
+
error?: FileProcessingError;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Result of a file processing operation.
|
|
109
|
+
* Uses discriminated union pattern for type-safe error handling.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const result = await processor.processFile(fileInfo);
|
|
114
|
+
* if (result.success) {
|
|
115
|
+
* console.log('Processed:', result.data.filename);
|
|
116
|
+
* } else {
|
|
117
|
+
* console.error('Error:', result.error.userMessage);
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export interface FileProcessingResult<T extends ProcessedFileBase = ProcessedFileBase> {
|
|
122
|
+
/** Whether the processing was successful */
|
|
123
|
+
success: boolean;
|
|
124
|
+
/** Processed file data (present when success is true) */
|
|
125
|
+
data?: T;
|
|
126
|
+
/** Error information (present when success is false) */
|
|
127
|
+
error?: FileProcessingError;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Configuration for retry behavior on transient failures.
|
|
131
|
+
* Implements exponential backoff with optional custom retry predicate.
|
|
132
|
+
*/
|
|
133
|
+
export interface RetryConfig {
|
|
134
|
+
/** Maximum number of retry attempts */
|
|
135
|
+
maxRetries: number;
|
|
136
|
+
/** Base delay between retries in milliseconds */
|
|
137
|
+
baseDelayMs: number;
|
|
138
|
+
/** Maximum delay between retries in milliseconds */
|
|
139
|
+
maxDelayMs: number;
|
|
140
|
+
/** Optional custom function to determine if an error is retryable */
|
|
141
|
+
retryOn?: (error: Error) => boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Options for file processing operations.
|
|
145
|
+
* Allows customization of download behavior and retry logic.
|
|
146
|
+
*/
|
|
147
|
+
export interface ProcessOptions {
|
|
148
|
+
/** Authentication headers for download requests */
|
|
149
|
+
authHeaders?: Record<string, string>;
|
|
150
|
+
/** Override default timeout (in milliseconds) */
|
|
151
|
+
timeout?: number;
|
|
152
|
+
/** Retry configuration for transient failures */
|
|
153
|
+
retryConfig?: RetryConfig;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Default retry configuration for file downloads.
|
|
157
|
+
* Uses exponential backoff: 1s, 2s, 4s (capped at maxDelayMs)
|
|
158
|
+
*/
|
|
159
|
+
export declare const DEFAULT_RETRY_CONFIG: RetryConfig;
|
|
160
|
+
/** Default timeout for text file downloads (30 seconds) */
|
|
161
|
+
export declare const DEFAULT_TEXT_TIMEOUT_MS = 30000;
|
|
162
|
+
/** Default maximum size for text files (10 MB) */
|
|
163
|
+
export declare const DEFAULT_TEXT_MAX_SIZE_MB = 10;
|
|
164
|
+
/** Default timeout for image file downloads (30 seconds) */
|
|
165
|
+
export declare const DEFAULT_IMAGE_TIMEOUT_MS = 30000;
|
|
166
|
+
/** Default maximum size for image files (10 MB) */
|
|
167
|
+
export declare const DEFAULT_IMAGE_MAX_SIZE_MB = 10;
|
|
168
|
+
/**
|
|
169
|
+
* Information about a successfully processed file.
|
|
170
|
+
*/
|
|
171
|
+
export interface ProcessedFileInfo {
|
|
172
|
+
/** File identifier */
|
|
173
|
+
fileId: string;
|
|
174
|
+
/** Filename */
|
|
175
|
+
filename: string;
|
|
176
|
+
/** MIME type */
|
|
177
|
+
mimetype: string;
|
|
178
|
+
/** Size in bytes */
|
|
179
|
+
size: number;
|
|
180
|
+
/** Type of processor used */
|
|
181
|
+
processorType: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Information about a file that failed to process.
|
|
185
|
+
*/
|
|
186
|
+
export interface FailedFileInfo {
|
|
187
|
+
/** File identifier */
|
|
188
|
+
fileId: string;
|
|
189
|
+
/** Filename */
|
|
190
|
+
filename: string;
|
|
191
|
+
/** MIME type */
|
|
192
|
+
mimetype: string;
|
|
193
|
+
/** Size in bytes */
|
|
194
|
+
size: number;
|
|
195
|
+
/** Error that caused the failure */
|
|
196
|
+
error: FileProcessingError;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Information about a file that was skipped.
|
|
200
|
+
*/
|
|
201
|
+
export interface SkippedFileInfo {
|
|
202
|
+
/** File identifier */
|
|
203
|
+
fileId: string;
|
|
204
|
+
/** Filename */
|
|
205
|
+
filename: string;
|
|
206
|
+
/** MIME type */
|
|
207
|
+
mimetype: string;
|
|
208
|
+
/** Size in bytes */
|
|
209
|
+
size: number;
|
|
210
|
+
/** Reason for skipping */
|
|
211
|
+
reason: string;
|
|
212
|
+
/** Suggested alternative action */
|
|
213
|
+
suggestedAlternative?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Warning about a file (non-fatal issue).
|
|
217
|
+
*/
|
|
218
|
+
export interface FileWarning {
|
|
219
|
+
/** File identifier */
|
|
220
|
+
fileId: string;
|
|
221
|
+
/** Filename */
|
|
222
|
+
filename: string;
|
|
223
|
+
/** Warning message */
|
|
224
|
+
message: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Summary of batch file processing operations.
|
|
228
|
+
*/
|
|
229
|
+
export interface BatchProcessingSummary<T extends ProcessedFileBase = ProcessedFileBase> {
|
|
230
|
+
/** Total number of files attempted */
|
|
231
|
+
totalFiles: number;
|
|
232
|
+
/** Successfully processed files */
|
|
233
|
+
processedFiles: ProcessedFileInfo[];
|
|
234
|
+
/** Files that failed to process */
|
|
235
|
+
failedFiles: FailedFileInfo[];
|
|
236
|
+
/** Files that were skipped (e.g., unsupported format) */
|
|
237
|
+
skippedFiles: SkippedFileInfo[];
|
|
238
|
+
/** Non-fatal warnings */
|
|
239
|
+
warnings: FileWarning[];
|
|
240
|
+
/** Processed results (parallel array with processedFiles) */
|
|
241
|
+
results: T[];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Result of finding a matching processor for a file.
|
|
245
|
+
* Includes both the processor and metadata about the match quality.
|
|
246
|
+
*
|
|
247
|
+
* Note: `processor` is typed as `unknown` here to avoid circular dependency
|
|
248
|
+
* on BaseFileProcessor. The registry module uses the properly typed version.
|
|
249
|
+
*/
|
|
250
|
+
export interface ProcessorMatch<_T extends ProcessedFileBase = ProcessedFileBase> {
|
|
251
|
+
/** Name of the matched processor */
|
|
252
|
+
name: string;
|
|
253
|
+
/** The processor instance */
|
|
254
|
+
processor: unknown;
|
|
255
|
+
/** Priority level of this processor */
|
|
256
|
+
priority: number;
|
|
257
|
+
/**
|
|
258
|
+
* Confidence score for the match (0-100).
|
|
259
|
+
* Higher values indicate better match quality:
|
|
260
|
+
* - 100: Exact MIME type match
|
|
261
|
+
* - 80: MIME type prefix match (e.g., "image/*")
|
|
262
|
+
* - 60: File extension match
|
|
263
|
+
* - 40: Generic/fallback match
|
|
264
|
+
*/
|
|
265
|
+
confidence: number;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Options for registry operations.
|
|
269
|
+
* Controls behavior when registering processors.
|
|
270
|
+
*/
|
|
271
|
+
export interface RegistryOptions {
|
|
272
|
+
/**
|
|
273
|
+
* Allow registering processors with duplicate names.
|
|
274
|
+
* If false (default), an error is thrown on duplicate names.
|
|
275
|
+
*/
|
|
276
|
+
allowDuplicates?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Overwrite existing processor with the same name.
|
|
279
|
+
* Takes precedence over allowDuplicates.
|
|
280
|
+
*/
|
|
281
|
+
overwriteExisting?: boolean;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Detailed error information for unsupported file types.
|
|
285
|
+
* Provides helpful suggestions for the user.
|
|
286
|
+
*/
|
|
287
|
+
export interface UnsupportedFileError {
|
|
288
|
+
/** Error code for programmatic handling */
|
|
289
|
+
code: "NO_PROCESSOR_FOUND" | "PROCESSING_FAILED";
|
|
290
|
+
/** Human-readable error message */
|
|
291
|
+
message: string;
|
|
292
|
+
/** Original filename */
|
|
293
|
+
filename: string;
|
|
294
|
+
/** MIME type of the file */
|
|
295
|
+
mimetype: string;
|
|
296
|
+
/** Helpful suggestion for the user */
|
|
297
|
+
suggestion: string;
|
|
298
|
+
/** List of supported file types */
|
|
299
|
+
supportedTypes: string[];
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Result of processing a file through the registry.
|
|
303
|
+
* Includes type information for tracking which processor was used.
|
|
304
|
+
*/
|
|
305
|
+
export interface RegistryProcessResult<T = unknown> {
|
|
306
|
+
/** Type/name of the processor that handled the file */
|
|
307
|
+
type: string;
|
|
308
|
+
/** Processed data (null if processing failed) */
|
|
309
|
+
data: T | null;
|
|
310
|
+
/** Error information if processing failed */
|
|
311
|
+
error?: UnsupportedFileError;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Priority levels for file processors.
|
|
315
|
+
* Lower number = higher priority = matched first.
|
|
316
|
+
*
|
|
317
|
+
* This priority system ensures that:
|
|
318
|
+
* - SVG files are processed as text (not images) since many AI providers don't support SVG format
|
|
319
|
+
* - More specific processors match before generic ones
|
|
320
|
+
* - Document types are processed in a logical order
|
|
321
|
+
*/
|
|
322
|
+
export declare const PROCESSOR_PRIORITIES: {
|
|
323
|
+
/** SVG files - processed as text before image processing */
|
|
324
|
+
readonly SVG: 5;
|
|
325
|
+
/** Image files - AI vision processing */
|
|
326
|
+
readonly IMAGE: 10;
|
|
327
|
+
/** PDF documents */
|
|
328
|
+
readonly PDF: 20;
|
|
329
|
+
/** CSV/tabular data */
|
|
330
|
+
readonly CSV: 30;
|
|
331
|
+
/** Markdown files - structured text */
|
|
332
|
+
readonly MARKDOWN: 40;
|
|
333
|
+
/** JSON data files */
|
|
334
|
+
readonly JSON: 50;
|
|
335
|
+
/** YAML configuration/data files */
|
|
336
|
+
readonly YAML: 60;
|
|
337
|
+
/** XML data files */
|
|
338
|
+
readonly XML: 70;
|
|
339
|
+
/** HTML web content */
|
|
340
|
+
readonly HTML: 80;
|
|
341
|
+
/** Excel spreadsheets */
|
|
342
|
+
readonly EXCEL: 90;
|
|
343
|
+
/** Legacy .doc files */
|
|
344
|
+
readonly DOC: 95;
|
|
345
|
+
/** Word documents (.docx) */
|
|
346
|
+
readonly WORD: 100;
|
|
347
|
+
/** Plain text files */
|
|
348
|
+
readonly TEXT: 110;
|
|
349
|
+
/** Source code files */
|
|
350
|
+
readonly SOURCE_CODE: 120;
|
|
351
|
+
/** Configuration files */
|
|
352
|
+
readonly CONFIG: 130;
|
|
353
|
+
/** RTF documents */
|
|
354
|
+
readonly RTF: 140;
|
|
355
|
+
/** OpenDocument format files */
|
|
356
|
+
readonly OPENDOCUMENT: 150;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Type for processor priority keys
|
|
360
|
+
*/
|
|
361
|
+
export type ProcessorPriorityKey = keyof typeof PROCESSOR_PRIORITIES;
|
|
362
|
+
/**
|
|
363
|
+
* Type for processor priority values
|
|
364
|
+
*/
|
|
365
|
+
export type ProcessorPriorityValue = (typeof PROCESSOR_PRIORITIES)[ProcessorPriorityKey];
|
|
366
|
+
/**
|
|
367
|
+
* Information about a registered processor.
|
|
368
|
+
* Used for discovery and documentation.
|
|
369
|
+
*/
|
|
370
|
+
export interface ProcessorInfo {
|
|
371
|
+
/** Unique name for the processor */
|
|
372
|
+
name: string;
|
|
373
|
+
/** Human-readable description */
|
|
374
|
+
description: string;
|
|
375
|
+
/** List of supported MIME types */
|
|
376
|
+
supportedMimeTypes: string[];
|
|
377
|
+
/** List of supported file extensions */
|
|
378
|
+
supportedExtensions: string[];
|
|
379
|
+
/** Priority level (lower = higher priority) */
|
|
380
|
+
priority?: number;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Error message template with user-friendly messaging and retry information.
|
|
384
|
+
* Re-exported from errors module for convenience.
|
|
385
|
+
*/
|
|
386
|
+
export type { ErrorMessageTemplate, FileErrorCode, } from "../errors/FileErrorCode.js";
|
|
387
|
+
/**
|
|
388
|
+
* Processed SVG result.
|
|
389
|
+
* Extends ProcessedFileBase with SVG-specific fields.
|
|
390
|
+
*/
|
|
391
|
+
export interface ProcessedSvg extends ProcessedFileBase {
|
|
392
|
+
/** Sanitized SVG content as text for AI processing */
|
|
393
|
+
textContent: string;
|
|
394
|
+
/** Original raw content (only included if sanitization modified the content) */
|
|
395
|
+
rawContent?: string;
|
|
396
|
+
/** Whether sanitization was applied to the content */
|
|
397
|
+
sanitized: boolean;
|
|
398
|
+
/** Security warnings found during processing */
|
|
399
|
+
securityWarnings: string[];
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Processed XML file result.
|
|
403
|
+
*/
|
|
404
|
+
export interface ProcessedXml extends ProcessedFileBase {
|
|
405
|
+
/** Original XML content */
|
|
406
|
+
content: string;
|
|
407
|
+
/** Parsed XML content (as JavaScript object) */
|
|
408
|
+
parsed: unknown;
|
|
409
|
+
/** Whether the XML is syntactically valid */
|
|
410
|
+
valid: boolean;
|
|
411
|
+
/** Error message if XML is invalid */
|
|
412
|
+
errorMessage?: string;
|
|
413
|
+
/** Name of the root element */
|
|
414
|
+
rootElement?: string;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Processed Markdown result.
|
|
418
|
+
*/
|
|
419
|
+
export interface ProcessedMarkdown extends ProcessedFileBase {
|
|
420
|
+
/** Original Markdown content */
|
|
421
|
+
content: string;
|
|
422
|
+
/** Total number of lines in the document */
|
|
423
|
+
lineCount: number;
|
|
424
|
+
/** Whether the document contains fenced code blocks */
|
|
425
|
+
hasCodeBlocks: boolean;
|
|
426
|
+
/** Whether the document contains Markdown tables */
|
|
427
|
+
hasTables: boolean;
|
|
428
|
+
/** List of headings extracted from the document */
|
|
429
|
+
headings: string[];
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Processed source code result.
|
|
433
|
+
*/
|
|
434
|
+
export interface ProcessedSourceCode extends ProcessedFileBase {
|
|
435
|
+
/** The source code content (may be truncated) */
|
|
436
|
+
content: string;
|
|
437
|
+
/** Detected programming language (e.g., "TypeScript", "Python") */
|
|
438
|
+
language: string;
|
|
439
|
+
/** Number of lines in the content */
|
|
440
|
+
lineCount: number;
|
|
441
|
+
/** Whether the content was truncated due to line limit */
|
|
442
|
+
truncated: boolean;
|
|
443
|
+
/** Character encoding used to decode the file */
|
|
444
|
+
encoding: string;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Processed configuration file result.
|
|
448
|
+
*/
|
|
449
|
+
export interface ProcessedConfig extends ProcessedFileBase {
|
|
450
|
+
/** The configuration file content with redacted sensitive values */
|
|
451
|
+
content: string;
|
|
452
|
+
/** Detected configuration format */
|
|
453
|
+
format: "env" | "ini" | "toml" | "properties" | "unknown";
|
|
454
|
+
/** Extracted key-value pairs (with sensitive values redacted) */
|
|
455
|
+
keyValues: Record<string, string>;
|
|
456
|
+
/** List of keys that were redacted for security */
|
|
457
|
+
redactedKeys: string[];
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Processed OpenDocument result.
|
|
461
|
+
*/
|
|
462
|
+
export interface ProcessedOpenDocument extends ProcessedFileBase {
|
|
463
|
+
/** Extracted text content */
|
|
464
|
+
textContent: string;
|
|
465
|
+
/** Document format type */
|
|
466
|
+
format: "odt" | "ods" | "odp" | "unknown";
|
|
467
|
+
/** Number of paragraphs/text elements found */
|
|
468
|
+
paragraphCount: number;
|
|
469
|
+
/** Whether content was truncated */
|
|
470
|
+
truncated: boolean;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Processed JSON file result.
|
|
474
|
+
*/
|
|
475
|
+
export interface ProcessedJson extends ProcessedFileBase {
|
|
476
|
+
/** Pretty-printed JSON content (or original content if invalid) */
|
|
477
|
+
content: string;
|
|
478
|
+
/** Original raw content before pretty-printing */
|
|
479
|
+
rawContent: string;
|
|
480
|
+
/** Parsed JSON object/array/value */
|
|
481
|
+
parsed: unknown;
|
|
482
|
+
/** Whether the JSON is syntactically valid */
|
|
483
|
+
valid: boolean;
|
|
484
|
+
/** Error message if JSON is invalid */
|
|
485
|
+
errorMessage?: string;
|
|
486
|
+
/** Number of top-level keys (for objects) */
|
|
487
|
+
keyCount?: number;
|
|
488
|
+
/** Length of the array (for arrays) */
|
|
489
|
+
arrayLength?: number;
|
|
490
|
+
/** Whether content was truncated */
|
|
491
|
+
truncated: boolean;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Processed plain text file result.
|
|
495
|
+
*/
|
|
496
|
+
export interface ProcessedText extends ProcessedFileBase {
|
|
497
|
+
/** Text content (may be truncated if file is too large) */
|
|
498
|
+
content: string;
|
|
499
|
+
/** Total number of lines in the original file */
|
|
500
|
+
lineCount: number;
|
|
501
|
+
/** Total number of words in the original file */
|
|
502
|
+
wordCount: number;
|
|
503
|
+
/** Character encoding used to decode the file */
|
|
504
|
+
encoding: string;
|
|
505
|
+
/** Whether the content was truncated due to size limits */
|
|
506
|
+
truncated: boolean;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Processed HTML file result.
|
|
510
|
+
*/
|
|
511
|
+
export interface ProcessedHtml extends ProcessedFileBase {
|
|
512
|
+
/** Original HTML content */
|
|
513
|
+
content: string;
|
|
514
|
+
/** Text extracted from HTML (all tags stripped) */
|
|
515
|
+
textContent: string;
|
|
516
|
+
/** Whether the HTML contains script tags */
|
|
517
|
+
hasScripts: boolean;
|
|
518
|
+
/** Whether the HTML contains style tags */
|
|
519
|
+
hasStyles: boolean;
|
|
520
|
+
/** Page title extracted from title tag, if present */
|
|
521
|
+
title?: string;
|
|
522
|
+
/** Whether the HTML contains potentially dangerous content (XSS vectors) */
|
|
523
|
+
hasDangerousContent: boolean;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Processed YAML file result.
|
|
527
|
+
*/
|
|
528
|
+
export interface ProcessedYaml extends ProcessedFileBase {
|
|
529
|
+
/** Original YAML content */
|
|
530
|
+
content: string;
|
|
531
|
+
/** Parsed YAML content (as JavaScript object) */
|
|
532
|
+
parsed: unknown;
|
|
533
|
+
/** Whether the YAML is syntactically valid */
|
|
534
|
+
valid: boolean;
|
|
535
|
+
/** Error message if YAML is invalid */
|
|
536
|
+
errorMessage?: string;
|
|
537
|
+
/** YAML content converted to JSON string for AI consumption */
|
|
538
|
+
asJson: string | null;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Single worksheet extracted from an Excel file.
|
|
542
|
+
*/
|
|
543
|
+
export interface ExcelWorksheet {
|
|
544
|
+
/** Name of the worksheet (tab name in Excel) */
|
|
545
|
+
name: string;
|
|
546
|
+
/** Row data as a 2D array. Each inner array represents a row. */
|
|
547
|
+
rows: (string | number | boolean | null)[][];
|
|
548
|
+
/** Headers extracted from the first row */
|
|
549
|
+
headers: string[];
|
|
550
|
+
/** Number of rows extracted (may be less than actual if truncated) */
|
|
551
|
+
rowCount: number;
|
|
552
|
+
/** Number of columns (based on headers or first row) */
|
|
553
|
+
columnCount: number;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Processed Excel file result.
|
|
557
|
+
*/
|
|
558
|
+
export interface ProcessedExcel extends ProcessedFileBase {
|
|
559
|
+
/** Array of processed worksheets */
|
|
560
|
+
worksheets: ExcelWorksheet[];
|
|
561
|
+
/** Number of sheets processed (may be less than total if truncated) */
|
|
562
|
+
sheetCount: number;
|
|
563
|
+
/** Total number of rows across all worksheets */
|
|
564
|
+
totalRows: number;
|
|
565
|
+
/** Whether any data was truncated due to limits */
|
|
566
|
+
truncated: boolean;
|
|
567
|
+
/** Names of sheets that were truncated */
|
|
568
|
+
truncatedSheets: string[];
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Processed Word document result.
|
|
572
|
+
*/
|
|
573
|
+
export interface ProcessedWord extends ProcessedFileBase {
|
|
574
|
+
/** Extracted plain text content from the Word document */
|
|
575
|
+
textContent: string;
|
|
576
|
+
/** HTML representation of the Word document */
|
|
577
|
+
htmlContent: string;
|
|
578
|
+
/** Warnings from mammoth extraction (e.g., unsupported elements) */
|
|
579
|
+
warnings: string[];
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Processed RTF document result.
|
|
583
|
+
*/
|
|
584
|
+
export interface ProcessedRtf extends ProcessedFileBase {
|
|
585
|
+
/** Extracted plain text content from the RTF document */
|
|
586
|
+
textContent: string;
|
|
587
|
+
/** Raw RTF content (preserved for debugging/analysis) */
|
|
588
|
+
rawContent: string;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Type guard function signature for JSON parsing.
|
|
592
|
+
*/
|
|
593
|
+
export type JsonTypeGuard<T> = (parsed: unknown) => parsed is T;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File Processor Types
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for ALL file processing type definitions.
|
|
5
|
+
* All processor infrastructure, registry, and SDK types are defined here.
|
|
6
|
+
*
|
|
7
|
+
* @module processors/base/types
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// CONSTANTS
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Default retry configuration for file downloads.
|
|
14
|
+
* Uses exponential backoff: 1s, 2s, 4s (capped at maxDelayMs)
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_RETRY_CONFIG = {
|
|
17
|
+
maxRetries: 3,
|
|
18
|
+
baseDelayMs: 1000,
|
|
19
|
+
maxDelayMs: 10000,
|
|
20
|
+
};
|
|
21
|
+
/** Default timeout for text file downloads (30 seconds) */
|
|
22
|
+
export const DEFAULT_TEXT_TIMEOUT_MS = 30000;
|
|
23
|
+
/** Default maximum size for text files (10 MB) */
|
|
24
|
+
export const DEFAULT_TEXT_MAX_SIZE_MB = 10;
|
|
25
|
+
/** Default timeout for image file downloads (30 seconds) */
|
|
26
|
+
export const DEFAULT_IMAGE_TIMEOUT_MS = 30000;
|
|
27
|
+
/** Default maximum size for image files (10 MB) */
|
|
28
|
+
export const DEFAULT_IMAGE_MAX_SIZE_MB = 10;
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// PRIORITY CONSTANTS
|
|
31
|
+
// =============================================================================
|
|
32
|
+
/**
|
|
33
|
+
* Priority levels for file processors.
|
|
34
|
+
* Lower number = higher priority = matched first.
|
|
35
|
+
*
|
|
36
|
+
* This priority system ensures that:
|
|
37
|
+
* - SVG files are processed as text (not images) since many AI providers don't support SVG format
|
|
38
|
+
* - More specific processors match before generic ones
|
|
39
|
+
* - Document types are processed in a logical order
|
|
40
|
+
*/
|
|
41
|
+
export const PROCESSOR_PRIORITIES = {
|
|
42
|
+
/** SVG files - processed as text before image processing */
|
|
43
|
+
SVG: 5,
|
|
44
|
+
/** Image files - AI vision processing */
|
|
45
|
+
IMAGE: 10,
|
|
46
|
+
/** PDF documents */
|
|
47
|
+
PDF: 20,
|
|
48
|
+
/** CSV/tabular data */
|
|
49
|
+
CSV: 30,
|
|
50
|
+
/** Markdown files - structured text */
|
|
51
|
+
MARKDOWN: 40,
|
|
52
|
+
/** JSON data files */
|
|
53
|
+
JSON: 50,
|
|
54
|
+
/** YAML configuration/data files */
|
|
55
|
+
YAML: 60,
|
|
56
|
+
/** XML data files */
|
|
57
|
+
XML: 70,
|
|
58
|
+
/** HTML web content */
|
|
59
|
+
HTML: 80,
|
|
60
|
+
/** Excel spreadsheets */
|
|
61
|
+
EXCEL: 90,
|
|
62
|
+
/** Legacy .doc files */
|
|
63
|
+
DOC: 95,
|
|
64
|
+
/** Word documents (.docx) */
|
|
65
|
+
WORD: 100,
|
|
66
|
+
/** Plain text files */
|
|
67
|
+
TEXT: 110,
|
|
68
|
+
/** Source code files */
|
|
69
|
+
SOURCE_CODE: 120,
|
|
70
|
+
/** Configuration files */
|
|
71
|
+
CONFIG: 130,
|
|
72
|
+
/** RTF documents */
|
|
73
|
+
RTF: 140,
|
|
74
|
+
/** OpenDocument format files */
|
|
75
|
+
OPENDOCUMENT: 150,
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=types.js.map
|