@datapos/datapos-shared 0.3.317 → 0.3.319
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/README.md +1 -2
- package/dist/datapos-shared.es.js +357 -330
- package/dist/types/src/component/componentConfig.schema.d.ts +1 -1
- package/dist/types/src/component/connector/connection.d.ts +5 -6
- package/dist/types/src/component/connector/index.d.ts +10 -12
- package/dist/types/src/component/context/index.d.ts +12 -12
- package/dist/types/src/component/dataView/OLD_ContentAuditColumn.d.ts +2 -2
- package/dist/types/src/component/dataView/index.d.ts +9 -11
- package/dist/types/src/component/index.d.ts +5 -5
- package/dist/types/src/component/presenter/index.d.ts +3 -3
- package/dist/types/src/component/presenter/presentation.d.ts +3 -3
- package/dist/types/src/engine/index.d.ts +4 -4
- package/dist/types/src/index.d.ts +36 -14
- package/package.json +4 -3
- package/dist/types/src/timestamp.d.ts +0 -4
|
@@ -128,7 +128,7 @@ export declare const moduleConfigSchema: import('valibot').ObjectSchema<{
|
|
|
128
128
|
}, undefined>, undefined>;
|
|
129
129
|
readonly statusId: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
|
|
130
130
|
}, undefined>;
|
|
131
|
-
export declare const
|
|
131
|
+
export declare const componentReferenceSchema: import('valibot').ObjectSchema<{
|
|
132
132
|
readonly id: import('valibot').StringSchema<undefined>;
|
|
133
133
|
readonly label: import('valibot').ObjectSchema<{
|
|
134
134
|
readonly 'en-au': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ComponentConfig } from '..';
|
|
2
2
|
import { ConnectorConfig } from '.';
|
|
3
|
-
import { Timestamp } from '../../timestamp';
|
|
4
3
|
export interface ConnectionAuthorizationConfig {
|
|
5
4
|
accessToken: string;
|
|
6
5
|
accountId: string;
|
|
7
|
-
expiresAt:
|
|
6
|
+
expiresAt: number;
|
|
8
7
|
expiresIn: number;
|
|
9
8
|
refreshToken: string;
|
|
10
9
|
scope: string;
|
|
@@ -14,7 +13,7 @@ export interface ConnectionAuthorizationConfig {
|
|
|
14
13
|
export interface ConnectionConfig extends ComponentConfig {
|
|
15
14
|
authorisation: Record<string, ConnectionAuthorizationConfig>;
|
|
16
15
|
connectorConfig: ConnectorConfig;
|
|
17
|
-
lastVerifiedAt:
|
|
16
|
+
lastVerifiedAt: number;
|
|
18
17
|
notation?: string;
|
|
19
18
|
}
|
|
20
19
|
export interface ConnectionNodeConfig {
|
|
@@ -27,7 +26,7 @@ export interface ConnectionNodeConfig {
|
|
|
27
26
|
nodeDisplayHeight?: number;
|
|
28
27
|
nodes?: ConnectionNodeConfig[];
|
|
29
28
|
label: string;
|
|
30
|
-
lastModifiedAt?:
|
|
29
|
+
lastModifiedAt?: number;
|
|
31
30
|
mimeType?: string;
|
|
32
31
|
name: string;
|
|
33
32
|
size?: number;
|
|
@@ -61,10 +60,10 @@ export interface ConnectionColumnConfig {
|
|
|
61
60
|
validValues?: Record<string, string>;
|
|
62
61
|
voidValueCount?: number;
|
|
63
62
|
}
|
|
64
|
-
export
|
|
63
|
+
export interface DPAFileSystemFileHandle {
|
|
65
64
|
readonly kind: 'file';
|
|
66
65
|
getFile(): Promise<File>;
|
|
67
|
-
}
|
|
66
|
+
}
|
|
68
67
|
export type StorageTypeId = 'binary' | 'boolean' | 'byte' | 'date' | 'dateTime' | 'dateTimeOffset' | 'decimal' | 'double' | 'int8' | 'int16' | 'int32' | 'int64' | 'object' | 'single' | 'string' | 'time' | 'unknown';
|
|
69
68
|
export type UsageTypeId = 'boolean' | 'decimalNumber' | 'moment' | 'momentDate' | 'momentTime' | 'string' | 'unknown' | 'wholeNumber';
|
|
70
69
|
export interface Encoding {
|
|
@@ -3,10 +3,10 @@ import { parse as dateFnsParse } from 'date-fns';
|
|
|
3
3
|
import { InferOutput } from 'valibot';
|
|
4
4
|
import { nanoid } from 'nanoid';
|
|
5
5
|
import { connectorConfigSchema } from './connectorConfig.schema';
|
|
6
|
+
import { LocalisedString } from '../../index';
|
|
6
7
|
import { buildFetchError, OperationalError } from '../../errors';
|
|
7
8
|
import { Component, ModuleConfig } from '..';
|
|
8
9
|
import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
9
|
-
import { convertMillisecondsToTimestamp, LocalisedString } from '../../index';
|
|
10
10
|
import { DataViewContentAuditConfig, ValueDelimiterId } from '../dataView';
|
|
11
11
|
import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../utilities';
|
|
12
12
|
type ConnectorModuleCategoryId = 'application' | 'curatedDataset' | 'database' | 'fileStore';
|
|
@@ -15,7 +15,7 @@ export type ConnectorUsageId = 'bidirectional' | 'destination' | 'source' | 'unk
|
|
|
15
15
|
export declare const CONNECTOR_DESTINATION_OPERATIONS: string[];
|
|
16
16
|
export declare const CONNECTOR_SOURCE_OPERATIONS: string[];
|
|
17
17
|
export interface Connector extends Component {
|
|
18
|
-
abortController?: AbortController
|
|
18
|
+
abortController?: AbortController;
|
|
19
19
|
readonly config: ConnectorConfig;
|
|
20
20
|
readonly connectionConfig: ConnectionConfig;
|
|
21
21
|
readonly tools: ConnectorTools;
|
|
@@ -32,7 +32,6 @@ export interface Connector extends Component {
|
|
|
32
32
|
retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
|
|
33
33
|
upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
|
|
34
34
|
}
|
|
35
|
-
export { connectorConfigSchema };
|
|
36
35
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
37
36
|
export interface ConnectorConfig1 extends ModuleConfig {
|
|
38
37
|
category: ConnectorCategory | null;
|
|
@@ -49,7 +48,7 @@ export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'descript
|
|
|
49
48
|
label: string;
|
|
50
49
|
description: string;
|
|
51
50
|
};
|
|
52
|
-
export
|
|
51
|
+
export interface ConnectorImplementation {
|
|
53
52
|
activeConnectionCount?: number;
|
|
54
53
|
canDescribe?: boolean;
|
|
55
54
|
id?: string;
|
|
@@ -57,12 +56,11 @@ export type ConnectorImplementation = {
|
|
|
57
56
|
label?: LocalisedString;
|
|
58
57
|
maxConnectionCount?: number;
|
|
59
58
|
params?: Record<string, string>[];
|
|
60
|
-
}
|
|
61
|
-
export
|
|
59
|
+
}
|
|
60
|
+
export interface ConnectorTools {
|
|
62
61
|
csvParse: typeof csvParse;
|
|
63
62
|
dataPos: {
|
|
64
63
|
buildFetchError: typeof buildFetchError;
|
|
65
|
-
convertMillisecondsToTimestamp: typeof convertMillisecondsToTimestamp;
|
|
66
64
|
extractExtensionFromPath: typeof extractExtensionFromPath;
|
|
67
65
|
extractNameFromPath: typeof extractNameFromPath;
|
|
68
66
|
lookupMimeTypeForExtension: typeof lookupMimeTypeForExtension;
|
|
@@ -72,7 +70,7 @@ export type ConnectorTools = {
|
|
|
72
70
|
parse: typeof dateFnsParse;
|
|
73
71
|
};
|
|
74
72
|
nanoid: typeof nanoid;
|
|
75
|
-
}
|
|
73
|
+
}
|
|
76
74
|
export interface InitialiseSettings {
|
|
77
75
|
connectorStorageURLPrefix: string;
|
|
78
76
|
}
|
|
@@ -95,8 +93,7 @@ export interface CreateSettings extends ConnectorOperationSettings {
|
|
|
95
93
|
path: string;
|
|
96
94
|
structure: string;
|
|
97
95
|
}
|
|
98
|
-
|
|
99
|
-
}
|
|
96
|
+
type DescribeSettings = ConnectorOperationSettings;
|
|
100
97
|
interface DescribeResult {
|
|
101
98
|
description: ConnectionDescription;
|
|
102
99
|
}
|
|
@@ -167,7 +164,8 @@ export interface ConnectorCallbackData {
|
|
|
167
164
|
typeId: string;
|
|
168
165
|
properties: Record<string, unknown>;
|
|
169
166
|
}
|
|
170
|
-
|
|
167
|
+
interface ConnectorCategory {
|
|
171
168
|
id: string;
|
|
172
169
|
label: string;
|
|
173
|
-
}
|
|
170
|
+
}
|
|
171
|
+
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { contextConfigSchema } from './contextConfig.schema';
|
|
3
3
|
import { LocalisedString } from '../../index';
|
|
4
|
-
import { Component, ComponentConfig,
|
|
4
|
+
import { Component, ComponentConfig, ComponentReference, ModuleConfig } from '..';
|
|
5
5
|
export interface Context extends Component {
|
|
6
6
|
readonly config: ContextConfig;
|
|
7
7
|
list(settings?: ContextListSettings): Promise<ContextListResult>;
|
|
8
8
|
}
|
|
9
|
-
export type ContextOperationSettings =
|
|
10
|
-
export type ContextListSettings =
|
|
11
|
-
export
|
|
9
|
+
export type ContextOperationSettings = object;
|
|
10
|
+
export type ContextListSettings = object;
|
|
11
|
+
export interface ContextListResult {
|
|
12
12
|
models: ContextModelGroupConfig[];
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
}
|
|
14
|
+
export interface ContextCallbackData {
|
|
15
15
|
typeId: string;
|
|
16
16
|
properties: Record<string, unknown>;
|
|
17
|
-
}
|
|
18
|
-
export { contextConfigSchema };
|
|
17
|
+
}
|
|
19
18
|
export type ContextConfig = InferOutput<typeof contextConfigSchema>;
|
|
20
19
|
export interface ContextConfig1 extends ModuleConfig {
|
|
21
20
|
models: ContextModelGroupConfig[];
|
|
@@ -28,7 +27,7 @@ export type ContextLocalisedConfig = Omit<ContextConfig, 'label' | 'description'
|
|
|
28
27
|
description: string;
|
|
29
28
|
};
|
|
30
29
|
export interface ContextModelGroupConfig extends ComponentConfig {
|
|
31
|
-
modelRefs:
|
|
30
|
+
modelRefs: ComponentReference[];
|
|
32
31
|
order: number;
|
|
33
32
|
}
|
|
34
33
|
export type ContextModelGroupLocalisedConfig = Omit<ContextModelGroupConfig, 'label' | 'description'> & {
|
|
@@ -49,7 +48,7 @@ export interface ContextModelDimensionGroupConfig {
|
|
|
49
48
|
id: string;
|
|
50
49
|
label: Partial<LocalisedString>;
|
|
51
50
|
description: Partial<LocalisedString>;
|
|
52
|
-
dimensionRefs:
|
|
51
|
+
dimensionRefs: ComponentReference[];
|
|
53
52
|
}
|
|
54
53
|
export type ContextModelDimensionGroupLocalisedConfig = Omit<ContextModelDimensionGroupConfig, 'label' | 'description'> & {
|
|
55
54
|
label: string;
|
|
@@ -76,7 +75,7 @@ export interface ContextModelEntityGroupConfig {
|
|
|
76
75
|
id: string;
|
|
77
76
|
label: Partial<LocalisedString>;
|
|
78
77
|
description?: Record<string, unknown>;
|
|
79
|
-
entityRefs:
|
|
78
|
+
entityRefs: ComponentReference[];
|
|
80
79
|
}
|
|
81
80
|
export type ContextModelEntityGroupLocalisedConfig = Omit<ContextModelEntityGroupConfig, 'label' | 'description'> & {
|
|
82
81
|
label: string;
|
|
@@ -123,7 +122,7 @@ export interface ContextModelSecondaryMeasureGroupConfig {
|
|
|
123
122
|
id: string;
|
|
124
123
|
label: Partial<LocalisedString>;
|
|
125
124
|
description?: Record<string, unknown>;
|
|
126
|
-
secondaryMeasureRefs:
|
|
125
|
+
secondaryMeasureRefs: ComponentReference[];
|
|
127
126
|
}
|
|
128
127
|
export type ContextModelSecondaryMeasureGroupLocalisedConfig = Omit<ContextModelSecondaryMeasureGroupConfig, 'label' | 'description'> & {
|
|
129
128
|
label: string;
|
|
@@ -137,3 +136,4 @@ export type ContextModelSecondaryMeasureLocalisedConfig = Omit<ContextModelSecon
|
|
|
137
136
|
label: string;
|
|
138
137
|
description: string;
|
|
139
138
|
};
|
|
139
|
+
export { contextConfigSchema } from './contextConfig.schema';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PreviewColumn } from './OLD_PreviewColumn';
|
|
2
|
-
export
|
|
2
|
+
export interface ParsedValue {
|
|
3
3
|
isValid: boolean;
|
|
4
4
|
value: bigint | boolean | number | string | null;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export declare class ContentAuditColumn extends PreviewColumn {
|
|
7
7
|
doCountIndividualValidValues: boolean;
|
|
8
8
|
doCountPatterns: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Timestamp } from '../../timestamp';
|
|
2
1
|
import { Component, ComponentConfig } from '..';
|
|
3
2
|
import { ConnectionColumnConfig, ConnectionNodeConfig } from '../connector/connection';
|
|
4
|
-
export
|
|
5
|
-
}
|
|
3
|
+
export type DataView = Component;
|
|
6
4
|
export interface DataViewConfig extends ComponentConfig {
|
|
7
5
|
connectionId?: string;
|
|
8
6
|
connectionNodeConfig?: ConnectionNodeConfig;
|
|
@@ -15,7 +13,7 @@ export type DataViewLocalisedConfig = Omit<DataViewConfig, 'label' | 'descriptio
|
|
|
15
13
|
description: string;
|
|
16
14
|
};
|
|
17
15
|
export interface DataViewContentAuditConfig {
|
|
18
|
-
asAt:
|
|
16
|
+
asAt: number;
|
|
19
17
|
columns: ConnectionColumnConfig[];
|
|
20
18
|
commentLineCount: number;
|
|
21
19
|
emptyLineCount: number;
|
|
@@ -25,7 +23,7 @@ export interface DataViewContentAuditConfig {
|
|
|
25
23
|
recordCount: number;
|
|
26
24
|
}
|
|
27
25
|
export interface DataViewPreviewConfig {
|
|
28
|
-
asAt:
|
|
26
|
+
asAt: number;
|
|
29
27
|
columnConfigs: ConnectionColumnConfig[];
|
|
30
28
|
dataFormatId: DataFormatId;
|
|
31
29
|
duration: number;
|
|
@@ -52,22 +50,22 @@ export interface EncodingConfig {
|
|
|
52
50
|
isDetectable: boolean;
|
|
53
51
|
isDecodable: boolean;
|
|
54
52
|
}
|
|
55
|
-
|
|
53
|
+
interface DataFormat {
|
|
56
54
|
id: string;
|
|
57
55
|
label: string;
|
|
58
|
-
}
|
|
56
|
+
}
|
|
59
57
|
export declare const getDataFormat: (id: string, localeId?: import('../../index').LocaleCode) => DataFormat;
|
|
60
58
|
export declare const getDataFormats: (localeId?: import('../../index').LocaleCode) => DataFormat[];
|
|
61
|
-
|
|
59
|
+
interface RecordDelimiter {
|
|
62
60
|
id: string;
|
|
63
61
|
label: string;
|
|
64
|
-
}
|
|
62
|
+
}
|
|
65
63
|
export declare const getRecordDelimiter: (id: string, localeId?: import('../../index').LocaleCode) => RecordDelimiter;
|
|
66
64
|
export declare const getRecordDelimiters: (localeId?: import('../../index').LocaleCode) => RecordDelimiter[];
|
|
67
|
-
|
|
65
|
+
interface ValueDelimiter {
|
|
68
66
|
id: string;
|
|
69
67
|
label: string;
|
|
70
|
-
}
|
|
68
|
+
}
|
|
71
69
|
export declare const getValueDelimiter: (id: string, localeId?: import('../../index').LocaleCode) => ValueDelimiter;
|
|
72
70
|
export declare const getValueDelimiters: (localeId?: import('../../index').LocaleCode) => ValueDelimiter[];
|
|
73
71
|
export type ParsedValue = bigint | boolean | number | string | null;
|
|
@@ -4,7 +4,6 @@ import { LocaleCode, LocalisedString, StatusColorId } from '../index';
|
|
|
4
4
|
export interface Component {
|
|
5
5
|
readonly config: ComponentConfig;
|
|
6
6
|
}
|
|
7
|
-
export { componentConfigSchema };
|
|
8
7
|
export type ComponentConfig = InferOutput<typeof componentConfigSchema>;
|
|
9
8
|
export interface ComponentConfig1 {
|
|
10
9
|
id: string;
|
|
@@ -18,7 +17,7 @@ export interface ComponentConfig1 {
|
|
|
18
17
|
statusId: ComponentStatusId;
|
|
19
18
|
typeId: ComponentTypeId;
|
|
20
19
|
}
|
|
21
|
-
export
|
|
20
|
+
export interface ComponentReference {
|
|
22
21
|
id: string;
|
|
23
22
|
label: Partial<LocalisedString>;
|
|
24
23
|
description: Partial<LocalisedString>;
|
|
@@ -26,12 +25,12 @@ export type ComponentRef = {
|
|
|
26
25
|
iconDark: string | null;
|
|
27
26
|
order: number;
|
|
28
27
|
path: string;
|
|
29
|
-
}
|
|
30
|
-
export
|
|
28
|
+
}
|
|
29
|
+
export interface ComponentStatus {
|
|
31
30
|
id: string;
|
|
32
31
|
color: StatusColorId;
|
|
33
32
|
label: string;
|
|
34
|
-
}
|
|
33
|
+
}
|
|
35
34
|
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
36
35
|
export declare const getComponentStatus: (id: string, localeId?: LocaleCode) => ComponentStatus;
|
|
37
36
|
export type ComponentTypeId = 'app' | 'connector' | 'connectorConnection' | 'context' | 'contextModelGroup' | 'contextModel' | 'contextModelDimensionGroup' | 'contextModelDimension' | 'contextModelDimensionHierarchy' | 'contextModelEntityGroup' | 'contextModelEntity' | 'contextModelEntityDataItem' | 'contextModelEntityEvent' | 'contextModelEntityPrimaryMeasure' | 'contextModelSecondaryMeasureGroup' | 'contextModelSecondaryMeasure' | 'dataView' | 'dimension' | 'engine' | 'eventQuery' | 'presenter' | 'presenterPresentation' | 'tool';
|
|
@@ -40,3 +39,4 @@ export interface ModuleConfig extends ComponentConfig {
|
|
|
40
39
|
version: string;
|
|
41
40
|
}
|
|
42
41
|
export type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
|
|
42
|
+
export { componentConfigSchema } from './componentConfig.schema';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, ComponentReference, ModuleConfig } from '..';
|
|
2
2
|
/**
|
|
3
3
|
* Presenter composables, constants, errors, types/interfaces and utilities.
|
|
4
4
|
*/
|
|
5
5
|
export { presenterConfigSchema } from './presenterConfig.schema';
|
|
6
6
|
export interface Presenter extends Component {
|
|
7
7
|
readonly config: PresenterConfig;
|
|
8
|
-
list():
|
|
8
|
+
list(): ComponentReference[];
|
|
9
9
|
render(presentationPath: string, renderTo: HTMLElement, data?: unknown): Promise<void>;
|
|
10
10
|
setColorMode(colorModeId: string): void;
|
|
11
11
|
}
|
|
12
12
|
export interface PresenterConfig extends ModuleConfig {
|
|
13
|
-
presentations:
|
|
13
|
+
presentations: ComponentReference[];
|
|
14
14
|
operations: PresenterOperation[];
|
|
15
15
|
typeId: 'presenter';
|
|
16
16
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { ComponentConfig } from '..';
|
|
3
3
|
import { presenterConfigSchema } from './presenterConfig.schema';
|
|
4
|
-
export { presenterConfigSchema };
|
|
5
4
|
export type PresentationConfig = InferOutput<typeof presenterConfigSchema>;
|
|
6
5
|
export interface PresentationConfig1 extends ComponentConfig {
|
|
7
6
|
content: string;
|
|
8
7
|
order: number;
|
|
9
8
|
}
|
|
10
|
-
export
|
|
9
|
+
export interface PresentationVisualConfig {
|
|
11
10
|
content: PresentationVisualContentConfig;
|
|
12
11
|
views: PresentationVisualViewConfig[];
|
|
13
|
-
}
|
|
12
|
+
}
|
|
14
13
|
export interface PresentationVisualContentConfig {
|
|
15
14
|
title?: {
|
|
16
15
|
text: string;
|
|
@@ -75,3 +74,4 @@ export interface PresentationView {
|
|
|
75
74
|
resize: () => void;
|
|
76
75
|
vendorId: string;
|
|
77
76
|
}
|
|
77
|
+
export { presenterConfigSchema } from './presenterConfig.schema';
|
|
@@ -7,18 +7,18 @@ export interface EngineConfig extends ModuleConfig {
|
|
|
7
7
|
typeId: 'engine';
|
|
8
8
|
}
|
|
9
9
|
type InitialiseEngine = (settings: InitialiseSettings) => Promise<void>;
|
|
10
|
-
type ProcessConnectorRequest = (id: string, connectionConfig: ConnectionConfig, settings: ConnectorOperationSettings, callback?: (
|
|
10
|
+
type ProcessConnectorRequest = (id: string, connectionConfig: ConnectionConfig, settings: ConnectorOperationSettings, callback?: (callbackData: ContextCallbackData) => void) => Promise<ConnectorInterfaceResult>;
|
|
11
11
|
export type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveResult;
|
|
12
|
-
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: (
|
|
12
|
+
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<ContextInterfaceResult>;
|
|
13
13
|
export type ContextInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveResult;
|
|
14
14
|
type ProcessTestRequest = (settings: TestSettings) => Promise<Record<string, unknown>>;
|
|
15
|
-
export
|
|
15
|
+
export interface TestSettings {
|
|
16
16
|
action?: string;
|
|
17
17
|
delimiter?: string;
|
|
18
18
|
forceFallback?: boolean;
|
|
19
19
|
hasHeaders?: boolean;
|
|
20
20
|
readable: ReadableStream<Uint8Array>;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
export interface Engine extends Component {
|
|
23
23
|
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
24
24
|
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorker;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared composables, constants,
|
|
2
|
+
* Shared composables, constants, errors, interfaces, schemas, types and utilities.
|
|
3
3
|
*/
|
|
4
|
+
/** Interfaces/Types */
|
|
4
5
|
export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
5
6
|
export type LocalisedString = Record<LocaleCode, string>;
|
|
7
|
+
/** Interfaces/Types - Component */
|
|
8
|
+
export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId } from './component';
|
|
6
9
|
export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
|
|
10
|
+
/** Schemas - Component */
|
|
7
11
|
export { componentConfigSchema } from './component';
|
|
8
|
-
|
|
9
|
-
export { connectorConfigSchema } from './component/connector';
|
|
10
|
-
export type { ConnectorOperation, ConnectorUsageId } from './component/connector';
|
|
12
|
+
/** Constants - Connector */
|
|
11
13
|
export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './component/connector';
|
|
14
|
+
/** Interfaces/Types Component - Connector */
|
|
15
|
+
export type { ConnectorOperation, ConnectorUsageId } from './component/connector';
|
|
12
16
|
export type { AuditContentResult, AuditContentSettings } from './component/connector';
|
|
13
17
|
export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './component/connector';
|
|
14
18
|
export type { CreateSettings } from './component/connector';
|
|
@@ -21,41 +25,59 @@ export type { PreviewResult, PreviewSettings } from './component/connector';
|
|
|
21
25
|
export type { RemoveSettings } from './component/connector';
|
|
22
26
|
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './component/connector';
|
|
23
27
|
export type { UpsertSettings } from './component/connector';
|
|
28
|
+
/** Interfaces/Types - Connection */
|
|
24
29
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
|
|
25
30
|
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
31
|
+
/** Schemas - Connector */
|
|
32
|
+
export { connectorConfigSchema } from './component/connector';
|
|
33
|
+
/** Interfaces/Types - Context. */
|
|
26
34
|
export { contextConfigSchema } from './component/context';
|
|
27
35
|
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
|
|
36
|
+
/** Interfaces/Types - Context model. */
|
|
28
37
|
export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
|
|
38
|
+
/** Interfaces/Types - Context model dimension. */
|
|
29
39
|
export type { ContextModelDimensionGroupConfig, ContextModelDimensionGroupLocalisedConfig, ContextModelDimensionConfig, ContextModelDimensionLocalisedConfig, ContextModelDimensionHierarchyConfig, ContextModelDimensionHierarchyLocalisedConfig } from './component/context';
|
|
40
|
+
/** Interfaces/Types - Context model entity. */
|
|
30
41
|
export type { ContextModelEntityGroupConfig, ContextModelEntityGroupLocalisedConfig, ContextModelEntityConfig, ContextModelEntityLocalisedConfig, ContextModelEntityDataItemConfig, // Data items.
|
|
31
42
|
ContextModelEntityDataItemLocalisedConfig, ContextModelEntityEventConfig, // Events.
|
|
32
43
|
ContextModelEntityEventLocalisedConfig, ContextModelEntityPrimaryMeasureConfig, // Primary measures.
|
|
33
44
|
ContextModelEntityPrimaryMeasureLocalisedConfig } from './component/context';
|
|
45
|
+
/** Interfaces/Types - Context model secondary measure. */
|
|
34
46
|
export type { ContextModelSecondaryMeasureGroupConfig, ContextModelSecondaryMeasureGroupLocalisedConfig, ContextModelSecondaryMeasureConfig, ContextModelSecondaryMeasureLocalisedConfig } from './component/context';
|
|
47
|
+
/** Interfaces/Types - Context Operator Settings */
|
|
48
|
+
export interface ContextOperationSettings {
|
|
49
|
+
accountId?: string;
|
|
50
|
+
appCheckToken?: string;
|
|
51
|
+
sessionAccessToken?: string;
|
|
52
|
+
}
|
|
53
|
+
/** Interfaces/Types - Data view. */
|
|
35
54
|
export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId } from './component/dataView';
|
|
36
55
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './component/dataView';
|
|
56
|
+
/** Interfaces/Types - Dimension. */
|
|
37
57
|
export type { DimensionConfig, DimensionLocalisedConfig } from './component/dimension';
|
|
58
|
+
/** Interfaces/Types - Engine. */
|
|
38
59
|
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine, EngineConfig, EngineWorker, TestSettings } from './engine';
|
|
60
|
+
/** Interfaces/Types */
|
|
39
61
|
export type { SerialisedError } from './errors';
|
|
62
|
+
/** Errors */
|
|
63
|
+
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
64
|
+
/** Utilities */
|
|
65
|
+
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
66
|
+
/** Interfaces/Types - Event query. */
|
|
40
67
|
export type { EventQueryConfig, EventQueryLocalisedConfig } from './component/eventQuery';
|
|
68
|
+
/** Interfaces/Types */
|
|
41
69
|
export { presenterConfigSchema } from './component/presenter';
|
|
42
70
|
export type { Presenter, PresenterConfig, PresenterLocalisedConfig, PresenterOperation } from './component/presenter';
|
|
71
|
+
/** Interfaces/Types - Presenter presentation. */
|
|
43
72
|
export type { PresentationConfig, PresentationView } from './component/presenter/presentation';
|
|
44
73
|
export type { PresentationCategoryId, PresentationCartesianTypeId, PresentationPolarTypeId, PresentationRangeTypeId, PresentationVisualConfig, PresentationVisualContentConfig, PresentationVisualViewConfig, PresentationVisualCartesianChartViewConfig, PresentationVisualChordDiagramViewConfig, PresentationVisualPeriodFlowBoundariesChartViewConfig, PresentationVisualPolarChartViewConfig, PresentationVisualRangeChartViewConfig, PresentationVisualSankeyDiagramViewConfig, PresentationVisualStreamGraphViewConfig, PresentationVisualValueTableViewConfig } from './component/presenter/presentation';
|
|
45
74
|
export type { ToolConfig } from './component/tool';
|
|
46
|
-
|
|
47
|
-
accountId?: string;
|
|
48
|
-
appCheckToken?: string;
|
|
49
|
-
sessionAccessToken?: string;
|
|
50
|
-
}
|
|
51
|
-
export type { Timestamp } from './timestamp';
|
|
75
|
+
/** Composables */
|
|
52
76
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
53
77
|
export { useDataTable } from './composables/useDataTable';
|
|
78
|
+
/** Constants */
|
|
54
79
|
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
55
|
-
|
|
56
|
-
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
57
|
-
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
58
|
-
export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
|
|
80
|
+
/** Utilities */
|
|
59
81
|
export { convertODataTypeIdToUsageTypeId } from './utilities';
|
|
60
82
|
export { extractExtensionFromPath, extractNameFromPath } from './utilities';
|
|
61
83
|
export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './utilities';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.319",
|
|
4
4
|
"description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"nanoid": "^5.1.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@datapos/datapos-development": "^0.3.
|
|
37
|
-
"@datapos/eslint-config-datapos": "^1.0.
|
|
36
|
+
"@datapos/datapos-development": "^0.3.395",
|
|
37
|
+
"@datapos/eslint-config-datapos": "^1.0.27",
|
|
38
38
|
"@types/node": "^25.0.3",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
40
40
|
"@typescript-eslint/parser": "^8.50.0",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"prettier": "^3.7.4",
|
|
56
56
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
57
57
|
"sonda": "^0.10.1",
|
|
58
|
+
"type-fest": "^5.3.1",
|
|
58
59
|
"typescript": "^5.9.3",
|
|
59
60
|
"valibot": "^1.2.0",
|
|
60
61
|
"vite": "^7.3.0",
|