@datapos/datapos-shared 0.3.70 → 0.3.72
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { parse as csvParse } from 'csv-parse/browser/esm';
|
|
1
2
|
import { parse as dateFnsParse } from 'date-fns';
|
|
2
3
|
import { nanoid } from 'nanoid';
|
|
3
|
-
import { Callback, parse as csvParse, Options, Parser } from 'csv-parse/browser/esm';
|
|
4
4
|
import { ComponentConfig } from './component';
|
|
5
5
|
import { convertMillisecondsToTimestamp } from '.';
|
|
6
6
|
import { buildFetchError, OperationalError } from './errors';
|
|
@@ -22,7 +22,7 @@ export interface Connector {
|
|
|
22
22
|
listNodes?(connector: Connector, settings: ListSettings): Promise<ListResult>;
|
|
23
23
|
previewObject?(connector: Connector, settings: PreviewSettings): Promise<PreviewResult>;
|
|
24
24
|
removeRecords?(connector: Connector, settings: RemoveSettings): Promise<void>;
|
|
25
|
-
retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void
|
|
25
|
+
retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
|
|
26
26
|
upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
|
|
27
27
|
}
|
|
28
28
|
export interface ConnectorTools {
|
|
@@ -153,9 +153,6 @@ export interface RetrieveSummary {
|
|
|
153
153
|
lineCount: number;
|
|
154
154
|
recordCount: number;
|
|
155
155
|
}
|
|
156
|
-
export interface RetrieveTools {
|
|
157
|
-
csvParse: (options: Options, callback?: Callback) => Parser | undefined;
|
|
158
|
-
}
|
|
159
156
|
export interface UpsertSettings extends ConnectorOperationSettings {
|
|
160
157
|
records: Record<string, unknown>[];
|
|
161
158
|
path: string;
|
|
@@ -12,7 +12,7 @@ export type { InitialiseSettings } from './connector';
|
|
|
12
12
|
export type { ListResult, ListSettings } from './connector';
|
|
13
13
|
export type { PreviewResult, PreviewSettings } from './connector';
|
|
14
14
|
export type { RemoveSettings } from './connector';
|
|
15
|
-
export type { RetrieveResult, RetrieveSettings, RetrieveSummary
|
|
15
|
+
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './connector';
|
|
16
16
|
export type { UpsertSettings } from './connector';
|
|
17
17
|
export type { Context, ContextConfig, ContextFocusConfig, ContextFocusConfigListResult, ContextFocusConfigListSettings, ContextModelConfig, ContextDimensionConfig, ContextDimensionGroupConfig, ContextEntityCharacteristicConfig, ContextEntityGroupConfig, ContextEntityComputationConfig, ContextSecondaryMeasureGroupConfig, ContextViewGroupConfig, ContextFocusLocalisedConfig } from './context';
|
|
18
18
|
export type { ContextEntityConfig, ContextEntityEventConfig, ContextHierarchyConfig, ContextViewConfig, Event } from './context';
|
|
@@ -20,7 +20,6 @@ export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId
|
|
|
20
20
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './dataView';
|
|
21
21
|
export type { DimensionConfig, DimensionLocalisedConfig } from './dimension';
|
|
22
22
|
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine, EngineWorker } from './engine';
|
|
23
|
-
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
24
23
|
export type { SerialisedError } from './errors';
|
|
25
24
|
export type { EventQueryConfig, EventQueryLocalisedConfig } from './eventQuery';
|
|
26
25
|
export type { Presenter, PresenterConfig, PresenterItemConfig, PresenterLocalisedConfig } from './presenter';
|
|
@@ -29,6 +28,7 @@ export type { ServiceData } from './service';
|
|
|
29
28
|
export type { StateConfig } from './state';
|
|
30
29
|
export type { Timestamp } from './timestamp';
|
|
31
30
|
export type { TutorialConfig } from './tutorial';
|
|
31
|
+
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
32
32
|
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
33
33
|
export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
|
|
34
34
|
export { convertODataTypeIdToUsageTypeId } from './utilities';
|