@danielarndt0/cnpj-db-loader 2.3.1 → 2.4.0-beta.1

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.ts CHANGED
@@ -967,4 +967,124 @@ declare function finalizeFederalRevenueManifest(outputPath: string, lastStatus:
967
967
 
968
968
  declare function syncFederalRevenueDataset(options?: FederalRevenueSyncOptions): Promise<FederalRevenueSyncSummary>;
969
969
 
970
- export { type AppConfig, type AppEnvironment, AppError, type CheckpointCleanupPhase, DEFAULT_FEDERAL_REVENUE_DOWNLOAD_ROOT, DEFAULT_FEDERAL_REVENUE_SHARE_TOKEN, DEFAULT_FEDERAL_REVENUE_USER_AGENT, DEFAULT_FEDERAL_REVENUE_WEBDAV_URL, type DatabaseCleanupSummary, type DatabaseConfig, type DatasetBlock, type DatasetType, type ExtractionEntry, type ExtractionProgressEvent, type ExtractionProgressListener, type ExtractionSummary, FEDERAL_REVENUE_CONTROL_DIR, FEDERAL_REVENUE_CONTROL_SCOPE, FEDERAL_REVENUE_MANIFEST_VERSION, type Failure, type FederalRevenueCheckOptions, type FederalRevenueCheckSummary, type FederalRevenueCleanMode, type FederalRevenueCleanOptions, type FederalRevenueCleanSummary, type FederalRevenueClientOptions, type FederalRevenueDownloadEntry, type FederalRevenueDownloadOptions, type FederalRevenueDownloadProgressEvent, type FederalRevenueDownloadProgressListener, type FederalRevenueDownloadStatus, type FederalRevenueDownloadSummary, type FederalRevenueFile, type FederalRevenueLocalFileStatus, type FederalRevenueLocalStatusEntry, type FederalRevenueLockFile, type FederalRevenueManifest, type FederalRevenueManifestFile, type FederalRevenueManifestLastCommand, type FederalRevenueManifestLastStatus, type FederalRevenueReference, type FederalRevenueReferenceMode, type FederalRevenueReferenceSelection, type FederalRevenueRetryOptions, type FederalRevenueStatusOptions, type FederalRevenueStatusSummary, type FederalRevenueSyncLockOptions, type FederalRevenueSyncOptions, type FederalRevenueSyncSummary, type FileInspection, type ImportCheckpointRecord, type ImportCheckpointStatus, type ImportDatasetPlan, type ImportDatasetType, type ImportFilePlan, type ImportOptions, type ImportPerformanceSummary, type ImportPhaseStatus, type ImportPlanRecord, type ImportProgressEvent, type ImportProgressListener, type ImportSchemaCapabilities, type ImportSummary, type InputDetectionMode, type InputMode, type InspectSummary, type LogLevel, type LogStatus, type QuarantineListFilters, type QuarantineListSummary, type QuarantineRecord, type QuarantineStatsFilters, type QuarantineStatsSummary, type Result, type SanitizeDatasetType, type SanitizeOptions, type SanitizePlan, type SanitizeProgressEvent, type SanitizeProgressListener, type SanitizeSummary, type SchemaGenerationOptions, type SchemaProfile, ServiceError, type StructuredLogEntry, type SupportedOs, ValidationError, type ValidationSummary, appendJsonLinesLog, assertPostgresUrl, buildFederalRevenueDownloadHeaders, buildFederalRevenueReferenceOutputPath, checkFederalRevenueDataset, cleanFederalRevenueDataset, cleanupDatabaseCheckpointsData, cleanupDatabaseMaterializedData, cleanupDatabasePlansData, cleanupDatabaseStagingData, createFederalRevenueManifest, createJsonLinesLog, defaultExtractedOutputPath, detectOs, downloadFederalRevenueDataset, ensureDirectory, evaluateFederalRevenueManifestFile, evaluateFederalRevenueManifestFiles, extractArchives, finalizeFederalRevenueManifest, generateSchemaSql, getAllLayouts, getCurrentFederalRevenueReference, getFederalRevenueControlDirectory, getFederalRevenueManifestPath, getFederalRevenueStatus, getFederalRevenueSyncLockPath, getLayoutSummary, getLogsDirectoryPath, getQuarantineStats, getUserAppDirectoryPath, importDataToDatabase, inspectFiles, listFederalRevenueFiles, listFederalRevenueReferences, listQuarantineRows, loadImportDataToStaging, materializeImportedData, prettyJson, readDatabaseConfig, readFederalRevenueManifest, resetDefaultDbUrl, resolveDatabaseUrl, resolveDbUrl, resolveFederalRevenueReference, resolveInputMode, resolveSchemaProfile, retryFederalRevenueDataset, runDoctor, safeReadText, safeWriteText, sanitizeInputDirectory, setDefaultDbUrl, showQuarantineRow, syncFederalRevenueDataset, testDatabaseConnection, toTitleCase, updateFederalRevenueManifestFile, validateFederalRevenueReference, validateInputDirectory, withFederalRevenueSyncLock, writeCommandFailureLog, writeCommandLog, writeDatabaseConfig, writeFederalRevenueManifest, writeSchemaFile };
970
+ type PostgresCsvDatasetSummary = {
971
+ dataset: ImportDatasetType;
972
+ files: number;
973
+ rows: number;
974
+ outputFiles: string[];
975
+ };
976
+ type PostgresCsvExportProgressEvent = {
977
+ kind: "start";
978
+ inputPath: string;
979
+ validatedPath: string;
980
+ outputPath: string;
981
+ totalFiles: number;
982
+ datasets: ImportDatasetType[];
983
+ } | {
984
+ kind: "file_start";
985
+ dataset: ImportDatasetType;
986
+ fileIndex: number;
987
+ totalFiles: number;
988
+ inputFile: string;
989
+ outputFile: string;
990
+ } | {
991
+ kind: "file_finish";
992
+ dataset: ImportDatasetType;
993
+ fileIndex: number;
994
+ totalFiles: number;
995
+ inputFile: string;
996
+ outputFile: string;
997
+ rows: number;
998
+ } | {
999
+ kind: "finish";
1000
+ outputPath: string;
1001
+ scriptPath: string;
1002
+ totalFiles: number;
1003
+ totalRows: number;
1004
+ };
1005
+ type PostgresCsvExportProgressListener = (event: PostgresCsvExportProgressEvent) => void;
1006
+ type PostgresCsvExportOptions = {
1007
+ outputPath?: string | undefined;
1008
+ dataset?: ImportDatasetType | undefined;
1009
+ scriptName?: string | undefined;
1010
+ onProgress?: PostgresCsvExportProgressListener | undefined;
1011
+ };
1012
+ type PostgresCsvExportSummary = {
1013
+ inputPath: string;
1014
+ validatedPath: string;
1015
+ outputPath: string;
1016
+ scriptPath: string;
1017
+ manifestPath: string;
1018
+ totalFiles: number;
1019
+ totalRows: number;
1020
+ datasets: PostgresCsvDatasetSummary[];
1021
+ warnings: string[];
1022
+ nextStep?: string | undefined;
1023
+ };
1024
+ type PostgresCsvFile = {
1025
+ dataset: ImportDatasetType;
1026
+ absolutePath: string;
1027
+ relativePath: string;
1028
+ rowCount: number;
1029
+ };
1030
+ type PostgresDirectSourceFile = {
1031
+ dataset: ImportDatasetType;
1032
+ absolutePath: string;
1033
+ relativePath: string;
1034
+ fileSize: number;
1035
+ };
1036
+ type PostgresDirectScriptDatasetSummary = {
1037
+ dataset: ImportDatasetType;
1038
+ files: number;
1039
+ totalBytes: number;
1040
+ sourceFiles: string[];
1041
+ };
1042
+ type PostgresDirectScriptProgressEvent = {
1043
+ kind: "start";
1044
+ inputPath: string;
1045
+ validatedPath: string;
1046
+ outputPath: string;
1047
+ totalFiles: number;
1048
+ datasets: ImportDatasetType[];
1049
+ sourceEncoding: string;
1050
+ } | {
1051
+ kind: "file_registered";
1052
+ dataset: ImportDatasetType;
1053
+ fileIndex: number;
1054
+ totalFiles: number;
1055
+ inputFile: string;
1056
+ fileSize: number;
1057
+ } | {
1058
+ kind: "finish";
1059
+ outputPath: string;
1060
+ scriptPath: string;
1061
+ totalFiles: number;
1062
+ totalBytes: number;
1063
+ };
1064
+ type PostgresDirectScriptProgressListener = (event: PostgresDirectScriptProgressEvent) => void;
1065
+ type PostgresDirectScriptOptions = {
1066
+ outputPath?: string | undefined;
1067
+ dataset?: ImportDatasetType | undefined;
1068
+ scriptName?: string | undefined;
1069
+ sourceEncoding?: string | undefined;
1070
+ onProgress?: PostgresDirectScriptProgressListener | undefined;
1071
+ };
1072
+ type PostgresDirectScriptSummary = {
1073
+ inputPath: string;
1074
+ validatedPath: string;
1075
+ outputPath: string;
1076
+ scriptPath: string;
1077
+ manifestPath: string;
1078
+ sourceEncoding: string;
1079
+ totalFiles: number;
1080
+ totalBytes: number;
1081
+ datasets: PostgresDirectScriptDatasetSummary[];
1082
+ warnings: string[];
1083
+ nextStep?: string | undefined;
1084
+ };
1085
+
1086
+ declare function exportPostgresCsvDataset(inputPath: string, options?: PostgresCsvExportOptions): Promise<PostgresCsvExportSummary>;
1087
+
1088
+ declare function generatePostgresDirectScript(inputPath: string, options?: PostgresDirectScriptOptions): Promise<PostgresDirectScriptSummary>;
1089
+
1090
+ export { type AppConfig, type AppEnvironment, AppError, type CheckpointCleanupPhase, DEFAULT_FEDERAL_REVENUE_DOWNLOAD_ROOT, DEFAULT_FEDERAL_REVENUE_SHARE_TOKEN, DEFAULT_FEDERAL_REVENUE_USER_AGENT, DEFAULT_FEDERAL_REVENUE_WEBDAV_URL, type DatabaseCleanupSummary, type DatabaseConfig, type DatasetBlock, type DatasetType, type ExtractionEntry, type ExtractionProgressEvent, type ExtractionProgressListener, type ExtractionSummary, FEDERAL_REVENUE_CONTROL_DIR, FEDERAL_REVENUE_CONTROL_SCOPE, FEDERAL_REVENUE_MANIFEST_VERSION, type Failure, type FederalRevenueCheckOptions, type FederalRevenueCheckSummary, type FederalRevenueCleanMode, type FederalRevenueCleanOptions, type FederalRevenueCleanSummary, type FederalRevenueClientOptions, type FederalRevenueDownloadEntry, type FederalRevenueDownloadOptions, type FederalRevenueDownloadProgressEvent, type FederalRevenueDownloadProgressListener, type FederalRevenueDownloadStatus, type FederalRevenueDownloadSummary, type FederalRevenueFile, type FederalRevenueLocalFileStatus, type FederalRevenueLocalStatusEntry, type FederalRevenueLockFile, type FederalRevenueManifest, type FederalRevenueManifestFile, type FederalRevenueManifestLastCommand, type FederalRevenueManifestLastStatus, type FederalRevenueReference, type FederalRevenueReferenceMode, type FederalRevenueReferenceSelection, type FederalRevenueRetryOptions, type FederalRevenueStatusOptions, type FederalRevenueStatusSummary, type FederalRevenueSyncLockOptions, type FederalRevenueSyncOptions, type FederalRevenueSyncSummary, type FileInspection, type ImportCheckpointRecord, type ImportCheckpointStatus, type ImportDatasetPlan, type ImportDatasetType, type ImportFilePlan, type ImportOptions, type ImportPerformanceSummary, type ImportPhaseStatus, type ImportPlanRecord, type ImportProgressEvent, type ImportProgressListener, type ImportSchemaCapabilities, type ImportSummary, type InputDetectionMode, type InputMode, type InspectSummary, type LogLevel, type LogStatus, type PostgresCsvDatasetSummary, type PostgresCsvExportOptions, type PostgresCsvExportProgressEvent, type PostgresCsvExportProgressListener, type PostgresCsvExportSummary, type PostgresCsvFile, type PostgresDirectScriptDatasetSummary, type PostgresDirectScriptOptions, type PostgresDirectScriptProgressEvent, type PostgresDirectScriptProgressListener, type PostgresDirectScriptSummary, type PostgresDirectSourceFile, type QuarantineListFilters, type QuarantineListSummary, type QuarantineRecord, type QuarantineStatsFilters, type QuarantineStatsSummary, type Result, type SanitizeDatasetType, type SanitizeOptions, type SanitizePlan, type SanitizeProgressEvent, type SanitizeProgressListener, type SanitizeSummary, type SchemaGenerationOptions, type SchemaProfile, ServiceError, type StructuredLogEntry, type SupportedOs, ValidationError, type ValidationSummary, appendJsonLinesLog, assertPostgresUrl, buildFederalRevenueDownloadHeaders, buildFederalRevenueReferenceOutputPath, checkFederalRevenueDataset, cleanFederalRevenueDataset, cleanupDatabaseCheckpointsData, cleanupDatabaseMaterializedData, cleanupDatabasePlansData, cleanupDatabaseStagingData, createFederalRevenueManifest, createJsonLinesLog, defaultExtractedOutputPath, detectOs, downloadFederalRevenueDataset, ensureDirectory, evaluateFederalRevenueManifestFile, evaluateFederalRevenueManifestFiles, exportPostgresCsvDataset, extractArchives, finalizeFederalRevenueManifest, generatePostgresDirectScript, generateSchemaSql, getAllLayouts, getCurrentFederalRevenueReference, getFederalRevenueControlDirectory, getFederalRevenueManifestPath, getFederalRevenueStatus, getFederalRevenueSyncLockPath, getLayoutSummary, getLogsDirectoryPath, getQuarantineStats, getUserAppDirectoryPath, importDataToDatabase, inspectFiles, listFederalRevenueFiles, listFederalRevenueReferences, listQuarantineRows, loadImportDataToStaging, materializeImportedData, prettyJson, readDatabaseConfig, readFederalRevenueManifest, resetDefaultDbUrl, resolveDatabaseUrl, resolveDbUrl, resolveFederalRevenueReference, resolveInputMode, resolveSchemaProfile, retryFederalRevenueDataset, runDoctor, safeReadText, safeWriteText, sanitizeInputDirectory, setDefaultDbUrl, showQuarantineRow, syncFederalRevenueDataset, testDatabaseConnection, toTitleCase, updateFederalRevenueManifestFile, validateFederalRevenueReference, validateInputDirectory, withFederalRevenueSyncLock, writeCommandFailureLog, writeCommandLog, writeDatabaseConfig, writeFederalRevenueManifest, writeSchemaFile };