@datapos/datapos-tool-csv-parse 0.0.72 → 0.0.74
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/datapos-tool-csv-parse.es.js +295 -293
- package/dist/types/src/index.d.ts +4 -4
- package/package.json +1 -1
|
@@ -2,15 +2,15 @@ import { Options as ParseOptions, Parser } from 'csv-parse/browser/esm';
|
|
|
2
2
|
import { RecordDelimiterId, ValueDelimiterId } from '@datapos/datapos-shared';
|
|
3
3
|
import { RetrieveRecordsOptions, RetrieveRecordsSummary } from '@datapos/datapos-shared/component/connector';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Parse record and parsed record buffer.
|
|
6
6
|
*/
|
|
7
|
-
type
|
|
7
|
+
type ParsedRecord = string[];
|
|
8
8
|
/**
|
|
9
9
|
* Schema configuration.
|
|
10
10
|
*/
|
|
11
11
|
interface SchemaConfig {
|
|
12
12
|
recordDelimiterId: RecordDelimiterId;
|
|
13
|
-
|
|
13
|
+
records: ParsedRecord[];
|
|
14
14
|
valueDelimiterId: ValueDelimiterId;
|
|
15
15
|
}
|
|
16
16
|
/** Tool. */
|
|
@@ -27,4 +27,4 @@ declare class Tool {
|
|
|
27
27
|
parseStream(retrieveRecordsOptions: RetrieveRecordsOptions, parseOptions: ParseOptions, url: string, abortController: AbortController, chunk: (records: (string[] | Record<string, unknown>)[]) => void): Promise<RetrieveRecordsSummary>;
|
|
28
28
|
}
|
|
29
29
|
export type { Options as ParseOptions, Parser } from 'csv-parse/browser/esm';
|
|
30
|
-
export { type
|
|
30
|
+
export { type ParsedRecord, type SchemaConfig, Tool };
|