@whaly/connector-sdk 0.3.9 → 0.3.11
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/dist/index.d.mts +84 -3
- package/dist/index.d.ts +84 -3
- package/dist/index.js +205 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +234 -103
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -147,6 +147,11 @@ declare const MIME_TYPES: Record<string, string>;
|
|
|
147
147
|
* Returns `application/octet-stream` when the extension is unknown.
|
|
148
148
|
*/
|
|
149
149
|
declare function getMimeType(filePathOrExt: string): string;
|
|
150
|
+
/**
|
|
151
|
+
* Look up the preferred file extension for a MIME type.
|
|
152
|
+
* Returns `.bin` when the MIME type is unknown.
|
|
153
|
+
*/
|
|
154
|
+
declare function getExtension(mimeType: string): string;
|
|
150
155
|
|
|
151
156
|
declare enum ReplicationMethod {
|
|
152
157
|
INCREMENTAL = "INCREMENTAL",
|
|
@@ -1120,15 +1125,59 @@ interface DownloadFilesOptions {
|
|
|
1120
1125
|
*/
|
|
1121
1126
|
declare function downloadFiles(client: Client, files: Client.FileInfo[], localDir: string, options?: DownloadFilesOptions): Promise<string[]>;
|
|
1122
1127
|
|
|
1128
|
+
/**
|
|
1129
|
+
* Common interface for storage services (cloud or local).
|
|
1130
|
+
* Implemented by CloudStorageService and LocalStorageService.
|
|
1131
|
+
*/
|
|
1132
|
+
interface StorageService {
|
|
1133
|
+
/**
|
|
1134
|
+
* Lists all files with an optional prefix/path filter.
|
|
1135
|
+
*/
|
|
1136
|
+
listFiles(prefix?: string): Promise<string[]>;
|
|
1137
|
+
/**
|
|
1138
|
+
* Returns files that haven't been marked as processed.
|
|
1139
|
+
*/
|
|
1140
|
+
getUnprocessedFiles(): Promise<string[]>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Creates a marker file to indicate a file has been processed.
|
|
1143
|
+
*/
|
|
1144
|
+
createMarkerFile(fileName: string): Promise<void>;
|
|
1145
|
+
/**
|
|
1146
|
+
* Downloads/resolves a file and returns a local file path.
|
|
1147
|
+
*/
|
|
1148
|
+
downloadFile(filePath: string, fileName: string): Promise<string>;
|
|
1149
|
+
/**
|
|
1150
|
+
* Resolves a file URI to a local file path.
|
|
1151
|
+
* Cloud: downloads from bucket. Local: resolves and validates the local path.
|
|
1152
|
+
*/
|
|
1153
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Uploads a local file to the storage destination.
|
|
1156
|
+
*/
|
|
1157
|
+
uploadFile(localPath: string, destPath: string): Promise<File>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Reads a storage object and returns its contents as a UTF-8 string.
|
|
1160
|
+
*/
|
|
1161
|
+
readObjectAsString(objectPath: string): Promise<string>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Writes a string to a storage object with JSON content type.
|
|
1164
|
+
*/
|
|
1165
|
+
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Uploads a local file with a unique generated name.
|
|
1168
|
+
*/
|
|
1169
|
+
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1123
1172
|
interface CloudStorageServiceOptions {
|
|
1124
1173
|
processedSuffix?: string;
|
|
1125
1174
|
supportedExtensions?: string[];
|
|
1126
1175
|
}
|
|
1127
1176
|
/**
|
|
1128
|
-
*
|
|
1177
|
+
* Google Cloud Storage implementation of StorageService.
|
|
1129
1178
|
* Supports file download, upload, listing, and marker-file-based processing tracking.
|
|
1130
1179
|
*/
|
|
1131
|
-
declare class CloudStorageService {
|
|
1180
|
+
declare class CloudStorageService implements StorageService {
|
|
1132
1181
|
private storage;
|
|
1133
1182
|
private bucket;
|
|
1134
1183
|
private processedSuffix;
|
|
@@ -1165,6 +1214,14 @@ declare class CloudStorageService {
|
|
|
1165
1214
|
* Writes a string to a GCS object with JSON content type.
|
|
1166
1215
|
*/
|
|
1167
1216
|
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Resolves a file URI to a local file path by downloading it from the configured GCS bucket.
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* const storage = new CloudStorageService("my-bucket", "my-folder");
|
|
1222
|
+
* const localPath = await storage.resolveFileUri("folder/file.xlsx");
|
|
1223
|
+
*/
|
|
1224
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1168
1225
|
/**
|
|
1169
1226
|
* Uploads a local file to the bucket with a unique name based on prefix, streamId, and UUID.
|
|
1170
1227
|
* Files are stored under `<prefix>/<run-id>/` when the RUN_ID env var is set,
|
|
@@ -1174,6 +1231,30 @@ declare class CloudStorageService {
|
|
|
1174
1231
|
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1175
1232
|
}
|
|
1176
1233
|
|
|
1234
|
+
interface LocalStorageServiceOptions {
|
|
1235
|
+
processedSuffix?: string;
|
|
1236
|
+
supportedExtensions?: string[];
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Local filesystem implementation of StorageService.
|
|
1240
|
+
* Operates entirely on the local filesystem — no cloud interaction.
|
|
1241
|
+
*/
|
|
1242
|
+
declare class LocalStorageService implements StorageService {
|
|
1243
|
+
private basePath;
|
|
1244
|
+
private processedSuffix;
|
|
1245
|
+
private supportedExtensions;
|
|
1246
|
+
constructor(basePath: string, opts?: LocalStorageServiceOptions);
|
|
1247
|
+
listFiles(prefix?: string): Promise<string[]>;
|
|
1248
|
+
getUnprocessedFiles(): Promise<string[]>;
|
|
1249
|
+
createMarkerFile(fileName: string): Promise<void>;
|
|
1250
|
+
downloadFile(filePath: string, _fileName: string): Promise<string>;
|
|
1251
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1252
|
+
uploadFile(localPath: string, destPath: string): Promise<File>;
|
|
1253
|
+
readObjectAsString(objectPath: string): Promise<string>;
|
|
1254
|
+
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1255
|
+
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1177
1258
|
/**
|
|
1178
1259
|
* Extract a ZIP (or other archive) file to a target directory.
|
|
1179
1260
|
* Uses the `decompress` library which supports zip, tar, gz, bz2, etc.
|
|
@@ -1639,4 +1720,4 @@ declare class GCSStateProvider implements StateProvider {
|
|
|
1639
1720
|
writeState(state: string): Promise<void>;
|
|
1640
1721
|
}
|
|
1641
1722
|
|
|
1642
|
-
export { ALL_STREAM_ID_KEYWORD, API_CALLS_METRIC_NAME, type AssetEntry, type AssetManifest, type AssetManifestEntry, type AssetReplicationMode, AssetStream, AssetTap, AssetTarget, Authenticator, BATCH_INTERVAL_MS, type BaseConfig, type BigQueryConfig, BigQueryTarget, type BigqueryLocation, type Bookmark, type Bookmarks, CdnAssetTarget, type CdnAssetTargetConfig, type CdnFileMetadata, CdnService, type CdnServiceConfig, type CdnUploadResult, CloudStorageService, type CloudStorageServiceOptions, type ColumnMappingStoreUnsafeToSafe, CounterMetric, CsvExtractionConfigBuilder, type CsvFieldsArrayConfig, type CsvFieldsConfig, type CsvFieldsDictConfig, type CsvFileConfig, type CsvStreamConfig, DEFAULT_MAX_CONCURRENT_STREAMS, DEFAULT_SYNCED_AT_COLUMN, DocumentDownloadSkipError, type DocumentEntry, type DocumentManifest, type DocumentManifestEntry, type DocumentStatus, DocumentStream, type DocumentStreamManifest, type DocumentSummary, DocumentTap, type DownloadFilesOptions, EXECUTION_TIME_METRIC_NAME, type ErrorType, type ExcelCustomExtractorConfig, type ExcelDerivedField, type ExcelExtractionBaseConfig, type ExcelExtractionConfig, ExcelExtractionConfigBuilder, type ExcelFieldMapping, type ExcelFieldSpec, type ExcelSingleSheetExtractionConfig, type ExcelSourceColumn, type ExcelStreamConfig, type FieldType, FileFormat, FilePatterns, FileStream, type FileStreamConfig, type FileStreamEntry, FileTap, type FileTapConfig, type FlattenedSchema, GCSStateProvider, type GetConfig, type HTTPHeaders, type HTTPMethod, ITarget, ImageTransform, type InputTapState, type InternalTableField, type JSONSchemaFieldDefinition, type ListFilesOptions, MIME_TYPES, type Message, type MessageType, type MetricConfiguration, MissingFieldInSchemaError, MissingSchemaError, type PostConfig, type ProcessedAsset, type ProgressMarkers, type PropertiesMetadata, RESTStream, ROWS_SYNCED_METRIC_NAME, RecordMessage, RenameColumnStore, ReplicationMethod, ReplicationMethodMessage, type SafeColumnNameConverterFn, type Schema, SchemaMessage, SchemaValidationError, SftpService, type State, type StateHolder, StateMessage, type StateProvider, StateService, Stream, type StreamId, type StreamManifest, type StreamState, StreamWarehouseSyncService, type StreamWithTempFile, type SyncOptions, Tap, type TapState, type TargetSchemaHook, type TargetSchemaHookInput, type TempFile, type URLParams, VariableExtractors, type WarehouseTableField, type WebpTransformOptions, type WhalyDocument, WhalyDocumentService, type WhalyDocumentServiceConfig, WhalyDocumentTarget, type WhalyPaginatedResponse, type WhalyUploadResult, type WriteGeneratorToCsvOptions, _greaterThan, addDocumentSummaries, addWhalyFields, checkCsvHeaderRow, coerceCellValue, collectPaginated, countCsvLines, createCellReference, createCsvStreamConfig, createExcelGenerator, createExcelStreamConfig, createTemporaryFileStream, csvFieldsToJsonSchema, downloadFiles, emptyDocumentSummary, excelColumnToIndex, excelFieldsToJsonSchema, excelRowToIndex, extractExcelRows, extractPrimaryKeysFromCsvConfig, extractPrimaryKeysFromExcelFields, extractStateForStream, fieldTypeToJsonSchema, finalizeStateProgressMarkers, findAllMatchingConfigs, flattenSchema, getAllMetrics, getApiEndpoint, getAxiosInstance, getCdnId, getCounterMetric, getCounterMetrics, getDownloadFileApiCall, getDryRunLimit, getJSONApiCall, getJSONApiCallWithFullResponse, getMimeType, getRawJSONApiCall, getServiceAccountKey, gracefulExit, haltAndCatchFire, incrementStreamState, indexToExcelColumn, indexToExcelRow, isDryRun, listFilesRecursively, loadJson, loadSchema, logger, optionalEnv, parseCellReference, postFormDataApiCall, postJSONApiCall, postUrlEncodedApiCall, printMemoryFootprint, processFileStreams, processFromAsyncIterable, removeParasiteProperties, requireEnv, rowGeneratorFromCsv, runWithConcurrency, safePath, unzip, validateExcelConfig, writeDataToCsv, writeGeneratorToCSV };
|
|
1723
|
+
export { ALL_STREAM_ID_KEYWORD, API_CALLS_METRIC_NAME, type AssetEntry, type AssetManifest, type AssetManifestEntry, type AssetReplicationMode, AssetStream, AssetTap, AssetTarget, Authenticator, BATCH_INTERVAL_MS, type BaseConfig, type BigQueryConfig, BigQueryTarget, type BigqueryLocation, type Bookmark, type Bookmarks, CdnAssetTarget, type CdnAssetTargetConfig, type CdnFileMetadata, CdnService, type CdnServiceConfig, type CdnUploadResult, CloudStorageService, type CloudStorageServiceOptions, type ColumnMappingStoreUnsafeToSafe, CounterMetric, CsvExtractionConfigBuilder, type CsvFieldsArrayConfig, type CsvFieldsConfig, type CsvFieldsDictConfig, type CsvFileConfig, type CsvStreamConfig, DEFAULT_MAX_CONCURRENT_STREAMS, DEFAULT_SYNCED_AT_COLUMN, DocumentDownloadSkipError, type DocumentEntry, type DocumentManifest, type DocumentManifestEntry, type DocumentStatus, DocumentStream, type DocumentStreamManifest, type DocumentSummary, DocumentTap, type DownloadFilesOptions, EXECUTION_TIME_METRIC_NAME, type ErrorType, type ExcelCustomExtractorConfig, type ExcelDerivedField, type ExcelExtractionBaseConfig, type ExcelExtractionConfig, ExcelExtractionConfigBuilder, type ExcelFieldMapping, type ExcelFieldSpec, type ExcelSingleSheetExtractionConfig, type ExcelSourceColumn, type ExcelStreamConfig, type FieldType, FileFormat, FilePatterns, FileStream, type FileStreamConfig, type FileStreamEntry, FileTap, type FileTapConfig, type FlattenedSchema, GCSStateProvider, type GetConfig, type HTTPHeaders, type HTTPMethod, ITarget, ImageTransform, type InputTapState, type InternalTableField, type JSONSchemaFieldDefinition, type ListFilesOptions, LocalStorageService, type LocalStorageServiceOptions, MIME_TYPES, type Message, type MessageType, type MetricConfiguration, MissingFieldInSchemaError, MissingSchemaError, type PostConfig, type ProcessedAsset, type ProgressMarkers, type PropertiesMetadata, RESTStream, ROWS_SYNCED_METRIC_NAME, RecordMessage, RenameColumnStore, ReplicationMethod, ReplicationMethodMessage, type SafeColumnNameConverterFn, type Schema, SchemaMessage, SchemaValidationError, SftpService, type State, type StateHolder, StateMessage, type StateProvider, StateService, type StorageService, Stream, type StreamId, type StreamManifest, type StreamState, StreamWarehouseSyncService, type StreamWithTempFile, type SyncOptions, Tap, type TapState, type TargetSchemaHook, type TargetSchemaHookInput, type TempFile, type URLParams, VariableExtractors, type WarehouseTableField, type WebpTransformOptions, type WhalyDocument, WhalyDocumentService, type WhalyDocumentServiceConfig, WhalyDocumentTarget, type WhalyPaginatedResponse, type WhalyUploadResult, type WriteGeneratorToCsvOptions, _greaterThan, addDocumentSummaries, addWhalyFields, checkCsvHeaderRow, coerceCellValue, collectPaginated, countCsvLines, createCellReference, createCsvStreamConfig, createExcelGenerator, createExcelStreamConfig, createTemporaryFileStream, csvFieldsToJsonSchema, downloadFiles, emptyDocumentSummary, excelColumnToIndex, excelFieldsToJsonSchema, excelRowToIndex, extractExcelRows, extractPrimaryKeysFromCsvConfig, extractPrimaryKeysFromExcelFields, extractStateForStream, fieldTypeToJsonSchema, finalizeStateProgressMarkers, findAllMatchingConfigs, flattenSchema, getAllMetrics, getApiEndpoint, getAxiosInstance, getCdnId, getCounterMetric, getCounterMetrics, getDownloadFileApiCall, getDryRunLimit, getExtension, getJSONApiCall, getJSONApiCallWithFullResponse, getMimeType, getRawJSONApiCall, getServiceAccountKey, gracefulExit, haltAndCatchFire, incrementStreamState, indexToExcelColumn, indexToExcelRow, isDryRun, listFilesRecursively, loadJson, loadSchema, logger, optionalEnv, parseCellReference, postFormDataApiCall, postJSONApiCall, postUrlEncodedApiCall, printMemoryFootprint, processFileStreams, processFromAsyncIterable, removeParasiteProperties, requireEnv, rowGeneratorFromCsv, runWithConcurrency, safePath, unzip, validateExcelConfig, writeDataToCsv, writeGeneratorToCSV };
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,11 @@ declare const MIME_TYPES: Record<string, string>;
|
|
|
147
147
|
* Returns `application/octet-stream` when the extension is unknown.
|
|
148
148
|
*/
|
|
149
149
|
declare function getMimeType(filePathOrExt: string): string;
|
|
150
|
+
/**
|
|
151
|
+
* Look up the preferred file extension for a MIME type.
|
|
152
|
+
* Returns `.bin` when the MIME type is unknown.
|
|
153
|
+
*/
|
|
154
|
+
declare function getExtension(mimeType: string): string;
|
|
150
155
|
|
|
151
156
|
declare enum ReplicationMethod {
|
|
152
157
|
INCREMENTAL = "INCREMENTAL",
|
|
@@ -1120,15 +1125,59 @@ interface DownloadFilesOptions {
|
|
|
1120
1125
|
*/
|
|
1121
1126
|
declare function downloadFiles(client: Client, files: Client.FileInfo[], localDir: string, options?: DownloadFilesOptions): Promise<string[]>;
|
|
1122
1127
|
|
|
1128
|
+
/**
|
|
1129
|
+
* Common interface for storage services (cloud or local).
|
|
1130
|
+
* Implemented by CloudStorageService and LocalStorageService.
|
|
1131
|
+
*/
|
|
1132
|
+
interface StorageService {
|
|
1133
|
+
/**
|
|
1134
|
+
* Lists all files with an optional prefix/path filter.
|
|
1135
|
+
*/
|
|
1136
|
+
listFiles(prefix?: string): Promise<string[]>;
|
|
1137
|
+
/**
|
|
1138
|
+
* Returns files that haven't been marked as processed.
|
|
1139
|
+
*/
|
|
1140
|
+
getUnprocessedFiles(): Promise<string[]>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Creates a marker file to indicate a file has been processed.
|
|
1143
|
+
*/
|
|
1144
|
+
createMarkerFile(fileName: string): Promise<void>;
|
|
1145
|
+
/**
|
|
1146
|
+
* Downloads/resolves a file and returns a local file path.
|
|
1147
|
+
*/
|
|
1148
|
+
downloadFile(filePath: string, fileName: string): Promise<string>;
|
|
1149
|
+
/**
|
|
1150
|
+
* Resolves a file URI to a local file path.
|
|
1151
|
+
* Cloud: downloads from bucket. Local: resolves and validates the local path.
|
|
1152
|
+
*/
|
|
1153
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Uploads a local file to the storage destination.
|
|
1156
|
+
*/
|
|
1157
|
+
uploadFile(localPath: string, destPath: string): Promise<File>;
|
|
1158
|
+
/**
|
|
1159
|
+
* Reads a storage object and returns its contents as a UTF-8 string.
|
|
1160
|
+
*/
|
|
1161
|
+
readObjectAsString(objectPath: string): Promise<string>;
|
|
1162
|
+
/**
|
|
1163
|
+
* Writes a string to a storage object with JSON content type.
|
|
1164
|
+
*/
|
|
1165
|
+
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Uploads a local file with a unique generated name.
|
|
1168
|
+
*/
|
|
1169
|
+
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1123
1172
|
interface CloudStorageServiceOptions {
|
|
1124
1173
|
processedSuffix?: string;
|
|
1125
1174
|
supportedExtensions?: string[];
|
|
1126
1175
|
}
|
|
1127
1176
|
/**
|
|
1128
|
-
*
|
|
1177
|
+
* Google Cloud Storage implementation of StorageService.
|
|
1129
1178
|
* Supports file download, upload, listing, and marker-file-based processing tracking.
|
|
1130
1179
|
*/
|
|
1131
|
-
declare class CloudStorageService {
|
|
1180
|
+
declare class CloudStorageService implements StorageService {
|
|
1132
1181
|
private storage;
|
|
1133
1182
|
private bucket;
|
|
1134
1183
|
private processedSuffix;
|
|
@@ -1165,6 +1214,14 @@ declare class CloudStorageService {
|
|
|
1165
1214
|
* Writes a string to a GCS object with JSON content type.
|
|
1166
1215
|
*/
|
|
1167
1216
|
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Resolves a file URI to a local file path by downloading it from the configured GCS bucket.
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* const storage = new CloudStorageService("my-bucket", "my-folder");
|
|
1222
|
+
* const localPath = await storage.resolveFileUri("folder/file.xlsx");
|
|
1223
|
+
*/
|
|
1224
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1168
1225
|
/**
|
|
1169
1226
|
* Uploads a local file to the bucket with a unique name based on prefix, streamId, and UUID.
|
|
1170
1227
|
* Files are stored under `<prefix>/<run-id>/` when the RUN_ID env var is set,
|
|
@@ -1174,6 +1231,30 @@ declare class CloudStorageService {
|
|
|
1174
1231
|
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1175
1232
|
}
|
|
1176
1233
|
|
|
1234
|
+
interface LocalStorageServiceOptions {
|
|
1235
|
+
processedSuffix?: string;
|
|
1236
|
+
supportedExtensions?: string[];
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Local filesystem implementation of StorageService.
|
|
1240
|
+
* Operates entirely on the local filesystem — no cloud interaction.
|
|
1241
|
+
*/
|
|
1242
|
+
declare class LocalStorageService implements StorageService {
|
|
1243
|
+
private basePath;
|
|
1244
|
+
private processedSuffix;
|
|
1245
|
+
private supportedExtensions;
|
|
1246
|
+
constructor(basePath: string, opts?: LocalStorageServiceOptions);
|
|
1247
|
+
listFiles(prefix?: string): Promise<string[]>;
|
|
1248
|
+
getUnprocessedFiles(): Promise<string[]>;
|
|
1249
|
+
createMarkerFile(fileName: string): Promise<void>;
|
|
1250
|
+
downloadFile(filePath: string, _fileName: string): Promise<string>;
|
|
1251
|
+
resolveFileUri(fileUri: string): Promise<string>;
|
|
1252
|
+
uploadFile(localPath: string, destPath: string): Promise<File>;
|
|
1253
|
+
readObjectAsString(objectPath: string): Promise<string>;
|
|
1254
|
+
writeStringObject(objectPath: string, contents: string): Promise<void>;
|
|
1255
|
+
uploadFileWithUniqueName(filePath: string, prefix: string, streamId: string): Promise<File>;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1177
1258
|
/**
|
|
1178
1259
|
* Extract a ZIP (or other archive) file to a target directory.
|
|
1179
1260
|
* Uses the `decompress` library which supports zip, tar, gz, bz2, etc.
|
|
@@ -1639,4 +1720,4 @@ declare class GCSStateProvider implements StateProvider {
|
|
|
1639
1720
|
writeState(state: string): Promise<void>;
|
|
1640
1721
|
}
|
|
1641
1722
|
|
|
1642
|
-
export { ALL_STREAM_ID_KEYWORD, API_CALLS_METRIC_NAME, type AssetEntry, type AssetManifest, type AssetManifestEntry, type AssetReplicationMode, AssetStream, AssetTap, AssetTarget, Authenticator, BATCH_INTERVAL_MS, type BaseConfig, type BigQueryConfig, BigQueryTarget, type BigqueryLocation, type Bookmark, type Bookmarks, CdnAssetTarget, type CdnAssetTargetConfig, type CdnFileMetadata, CdnService, type CdnServiceConfig, type CdnUploadResult, CloudStorageService, type CloudStorageServiceOptions, type ColumnMappingStoreUnsafeToSafe, CounterMetric, CsvExtractionConfigBuilder, type CsvFieldsArrayConfig, type CsvFieldsConfig, type CsvFieldsDictConfig, type CsvFileConfig, type CsvStreamConfig, DEFAULT_MAX_CONCURRENT_STREAMS, DEFAULT_SYNCED_AT_COLUMN, DocumentDownloadSkipError, type DocumentEntry, type DocumentManifest, type DocumentManifestEntry, type DocumentStatus, DocumentStream, type DocumentStreamManifest, type DocumentSummary, DocumentTap, type DownloadFilesOptions, EXECUTION_TIME_METRIC_NAME, type ErrorType, type ExcelCustomExtractorConfig, type ExcelDerivedField, type ExcelExtractionBaseConfig, type ExcelExtractionConfig, ExcelExtractionConfigBuilder, type ExcelFieldMapping, type ExcelFieldSpec, type ExcelSingleSheetExtractionConfig, type ExcelSourceColumn, type ExcelStreamConfig, type FieldType, FileFormat, FilePatterns, FileStream, type FileStreamConfig, type FileStreamEntry, FileTap, type FileTapConfig, type FlattenedSchema, GCSStateProvider, type GetConfig, type HTTPHeaders, type HTTPMethod, ITarget, ImageTransform, type InputTapState, type InternalTableField, type JSONSchemaFieldDefinition, type ListFilesOptions, MIME_TYPES, type Message, type MessageType, type MetricConfiguration, MissingFieldInSchemaError, MissingSchemaError, type PostConfig, type ProcessedAsset, type ProgressMarkers, type PropertiesMetadata, RESTStream, ROWS_SYNCED_METRIC_NAME, RecordMessage, RenameColumnStore, ReplicationMethod, ReplicationMethodMessage, type SafeColumnNameConverterFn, type Schema, SchemaMessage, SchemaValidationError, SftpService, type State, type StateHolder, StateMessage, type StateProvider, StateService, Stream, type StreamId, type StreamManifest, type StreamState, StreamWarehouseSyncService, type StreamWithTempFile, type SyncOptions, Tap, type TapState, type TargetSchemaHook, type TargetSchemaHookInput, type TempFile, type URLParams, VariableExtractors, type WarehouseTableField, type WebpTransformOptions, type WhalyDocument, WhalyDocumentService, type WhalyDocumentServiceConfig, WhalyDocumentTarget, type WhalyPaginatedResponse, type WhalyUploadResult, type WriteGeneratorToCsvOptions, _greaterThan, addDocumentSummaries, addWhalyFields, checkCsvHeaderRow, coerceCellValue, collectPaginated, countCsvLines, createCellReference, createCsvStreamConfig, createExcelGenerator, createExcelStreamConfig, createTemporaryFileStream, csvFieldsToJsonSchema, downloadFiles, emptyDocumentSummary, excelColumnToIndex, excelFieldsToJsonSchema, excelRowToIndex, extractExcelRows, extractPrimaryKeysFromCsvConfig, extractPrimaryKeysFromExcelFields, extractStateForStream, fieldTypeToJsonSchema, finalizeStateProgressMarkers, findAllMatchingConfigs, flattenSchema, getAllMetrics, getApiEndpoint, getAxiosInstance, getCdnId, getCounterMetric, getCounterMetrics, getDownloadFileApiCall, getDryRunLimit, getJSONApiCall, getJSONApiCallWithFullResponse, getMimeType, getRawJSONApiCall, getServiceAccountKey, gracefulExit, haltAndCatchFire, incrementStreamState, indexToExcelColumn, indexToExcelRow, isDryRun, listFilesRecursively, loadJson, loadSchema, logger, optionalEnv, parseCellReference, postFormDataApiCall, postJSONApiCall, postUrlEncodedApiCall, printMemoryFootprint, processFileStreams, processFromAsyncIterable, removeParasiteProperties, requireEnv, rowGeneratorFromCsv, runWithConcurrency, safePath, unzip, validateExcelConfig, writeDataToCsv, writeGeneratorToCSV };
|
|
1723
|
+
export { ALL_STREAM_ID_KEYWORD, API_CALLS_METRIC_NAME, type AssetEntry, type AssetManifest, type AssetManifestEntry, type AssetReplicationMode, AssetStream, AssetTap, AssetTarget, Authenticator, BATCH_INTERVAL_MS, type BaseConfig, type BigQueryConfig, BigQueryTarget, type BigqueryLocation, type Bookmark, type Bookmarks, CdnAssetTarget, type CdnAssetTargetConfig, type CdnFileMetadata, CdnService, type CdnServiceConfig, type CdnUploadResult, CloudStorageService, type CloudStorageServiceOptions, type ColumnMappingStoreUnsafeToSafe, CounterMetric, CsvExtractionConfigBuilder, type CsvFieldsArrayConfig, type CsvFieldsConfig, type CsvFieldsDictConfig, type CsvFileConfig, type CsvStreamConfig, DEFAULT_MAX_CONCURRENT_STREAMS, DEFAULT_SYNCED_AT_COLUMN, DocumentDownloadSkipError, type DocumentEntry, type DocumentManifest, type DocumentManifestEntry, type DocumentStatus, DocumentStream, type DocumentStreamManifest, type DocumentSummary, DocumentTap, type DownloadFilesOptions, EXECUTION_TIME_METRIC_NAME, type ErrorType, type ExcelCustomExtractorConfig, type ExcelDerivedField, type ExcelExtractionBaseConfig, type ExcelExtractionConfig, ExcelExtractionConfigBuilder, type ExcelFieldMapping, type ExcelFieldSpec, type ExcelSingleSheetExtractionConfig, type ExcelSourceColumn, type ExcelStreamConfig, type FieldType, FileFormat, FilePatterns, FileStream, type FileStreamConfig, type FileStreamEntry, FileTap, type FileTapConfig, type FlattenedSchema, GCSStateProvider, type GetConfig, type HTTPHeaders, type HTTPMethod, ITarget, ImageTransform, type InputTapState, type InternalTableField, type JSONSchemaFieldDefinition, type ListFilesOptions, LocalStorageService, type LocalStorageServiceOptions, MIME_TYPES, type Message, type MessageType, type MetricConfiguration, MissingFieldInSchemaError, MissingSchemaError, type PostConfig, type ProcessedAsset, type ProgressMarkers, type PropertiesMetadata, RESTStream, ROWS_SYNCED_METRIC_NAME, RecordMessage, RenameColumnStore, ReplicationMethod, ReplicationMethodMessage, type SafeColumnNameConverterFn, type Schema, SchemaMessage, SchemaValidationError, SftpService, type State, type StateHolder, StateMessage, type StateProvider, StateService, type StorageService, Stream, type StreamId, type StreamManifest, type StreamState, StreamWarehouseSyncService, type StreamWithTempFile, type SyncOptions, Tap, type TapState, type TargetSchemaHook, type TargetSchemaHookInput, type TempFile, type URLParams, VariableExtractors, type WarehouseTableField, type WebpTransformOptions, type WhalyDocument, WhalyDocumentService, type WhalyDocumentServiceConfig, WhalyDocumentTarget, type WhalyPaginatedResponse, type WhalyUploadResult, type WriteGeneratorToCsvOptions, _greaterThan, addDocumentSummaries, addWhalyFields, checkCsvHeaderRow, coerceCellValue, collectPaginated, countCsvLines, createCellReference, createCsvStreamConfig, createExcelGenerator, createExcelStreamConfig, createTemporaryFileStream, csvFieldsToJsonSchema, downloadFiles, emptyDocumentSummary, excelColumnToIndex, excelFieldsToJsonSchema, excelRowToIndex, extractExcelRows, extractPrimaryKeysFromCsvConfig, extractPrimaryKeysFromExcelFields, extractStateForStream, fieldTypeToJsonSchema, finalizeStateProgressMarkers, findAllMatchingConfigs, flattenSchema, getAllMetrics, getApiEndpoint, getAxiosInstance, getCdnId, getCounterMetric, getCounterMetrics, getDownloadFileApiCall, getDryRunLimit, getExtension, getJSONApiCall, getJSONApiCallWithFullResponse, getMimeType, getRawJSONApiCall, getServiceAccountKey, gracefulExit, haltAndCatchFire, incrementStreamState, indexToExcelColumn, indexToExcelRow, isDryRun, listFilesRecursively, loadJson, loadSchema, logger, optionalEnv, parseCellReference, postFormDataApiCall, postJSONApiCall, postUrlEncodedApiCall, printMemoryFootprint, processFileStreams, processFromAsyncIterable, removeParasiteProperties, requireEnv, rowGeneratorFromCsv, runWithConcurrency, safePath, unzip, validateExcelConfig, writeDataToCsv, writeGeneratorToCSV };
|