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 = {
2929 is_document_compressed ?: boolean ;
3030 document_compression_format ?: 'gzip' | 'zstd' | 'deflate' | CompressionFormat ;
3131 webhook ?: string ;
32+
33+ // deprecated options
34+ template ?: string ;
35+ ephemeral_template ?: object ;
3236} ;
3337
3438export class ExtractionConfig {
@@ -44,8 +48,29 @@ export class ExtractionConfig {
4448 document_compression_format ?: 'gzip' | 'zstd' | 'deflate' | CompressionFormat ;
4549 webhook ?: string ;
4650
51+ // // deprecated options
52+ template ?: string ;
53+ ephemeral_template ?: object ;
54+
4755 constructor ( options : ExtractionConfigOptions ) {
4856 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+
4974 if (
5075 options . document_compression_format &&
5176 ! Object . values ( CompressionFormat ) . includes ( options . document_compression_format as CompressionFormat )
Original file line number Diff line number Diff line change 55 "types" : [" node" , " jest" ],
66 "skipLibCheck" : true ,
77 "module" : " ESNext" ,
8- "lib" : [" ES2022" , " ESNext" ],
8+ "lib" : [" ES2022" , " ESNext" , " dom " ],
99 "moduleResolution" : " Node" ,
1010 "rootDir" : " ." ,
1111 "outDir" : " build" ,
You can’t perform that action at this time.
0 commit comments