File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ type ExtractionConfigOptions = {
29
29
is_document_compressed ?: boolean ;
30
30
document_compression_format ?: 'gzip' | 'zstd' | 'deflate' | CompressionFormat ;
31
31
webhook ?: string ;
32
+
33
+ // deprecated options
34
+ template ?: string ;
35
+ ephemeral_template ?: object ;
32
36
} ;
33
37
34
38
export class ExtractionConfig {
@@ -44,8 +48,29 @@ export class ExtractionConfig {
44
48
document_compression_format ?: 'gzip' | 'zstd' | 'deflate' | CompressionFormat ;
45
49
webhook ?: string ;
46
50
51
+ // // deprecated options
52
+ template ?: string ;
53
+ ephemeral_template ?: object ;
54
+
47
55
constructor ( options : ExtractionConfigOptions ) {
48
56
this . validateOptions ( options ) ;
57
+ if ( options . template ) {
58
+ console . warn (
59
+ `Deprecation warning: 'template' is deprecated. Use 'extraction_template' instead.`
60
+ ) ;
61
+ this . extraction_template = options . template ;
62
+ } else {
63
+ this . extraction_template = options . extraction_template ;
64
+ }
65
+ if ( options . ephemeral_template ) {
66
+ console . warn (
67
+ `Deprecation warning: 'ephemeral_template' is deprecated. Use 'extraction_ephemeral_template' instead.`
68
+ ) ;
69
+ this . extraction_ephemeral_template = options . ephemeral_template ;
70
+ } else {
71
+ this . extraction_ephemeral_template = options . extraction_ephemeral_template ;
72
+ }
73
+
49
74
if (
50
75
options . document_compression_format &&
51
76
! Object . values ( CompressionFormat ) . includes ( options . document_compression_format as CompressionFormat )
Original file line number Diff line number Diff line change 5
5
"types" : [" node" , " jest" ],
6
6
"skipLibCheck" : true ,
7
7
"module" : " ESNext" ,
8
- "lib" : [" ES2022" , " ESNext" ],
8
+ "lib" : [" ES2022" , " ESNext" , " dom " ],
9
9
"moduleResolution" : " Node" ,
10
10
"rootDir" : " ." ,
11
11
"outDir" : " build" ,
You can’t perform that action at this time.
0 commit comments