@datapos/datapos-shared 0.3.317 → 0.3.325
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 +9 -11
- package/README.pdf +0 -0
- package/dist/datapos-shared.es.js +357 -330
- package/dist/types/src/component/componentConfig.schema.d.ts +2 -2
- package/dist/types/src/component/connector/connection.d.ts +5 -6
- package/dist/types/src/component/connector/connectorConfig.schema.d.ts +4 -0
- package/dist/types/src/component/connector/index.d.ts +22 -15
- package/dist/types/src/component/context/contextConfig.schema.d.ts +4 -0
- 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 +10 -24
- 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/component/presenter/presenterConfig.schema.d.ts +4 -0
- package/dist/types/src/engine/index.d.ts +4 -4
- package/dist/types/src/index.d.ts +37 -29
- package/package.json +7 -4
- package/dist/types/src/timestamp.d.ts +0 -4
|
@@ -15,7 +15,7 @@ export declare const partialLocalisedStringSchema: import('valibot').ObjectSchem
|
|
|
15
15
|
readonly 'en-us': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
16
|
readonly 'es-es': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
17
17
|
}, undefined>;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const componentStatusColorIdSchema: LiteralUnionSchema<readonly ["amber", "green", "red", "other"]>;
|
|
19
19
|
export declare const componentStatusIdSchema: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
|
|
20
20
|
export declare const componentTypeIdSchema: LiteralUnionSchema<readonly ["app", "connector", "connectorConnection", "context", "contextModelGroup", "contextModel", "contextModelDimensionGroup", "contextModelDimension", "contextModelDimensionHierarchy", "contextModelEntityGroup", "contextModelEntity", "contextModelEntityDataItem", "contextModelEntityEvent", "contextModelEntityPrimaryMeasure", "contextModelSecondaryMeasureGroup", "contextModelSecondaryMeasure", "dataView", "dimension", "engine", "eventQuery", "presenter", "presenterPresentation", "tool"]>;
|
|
21
21
|
export declare const moduleTypeIdSchema: LiteralUnionSchema<readonly ["app", "engine", "connector", "context", "presenter", "tool"]>;
|
|
@@ -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 {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connector schema.
|
|
3
|
+
* Drafted by Copilot.
|
|
4
|
+
*/
|
|
1
5
|
export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
2
6
|
readonly typeId: import('valibot').LiteralSchema<"connector", undefined>;
|
|
3
7
|
readonly category: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
@@ -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;
|
|
@@ -25,14 +25,14 @@ export interface Connector extends Component {
|
|
|
25
25
|
describeConnection?(connector: Connector, settings: DescribeSettings): Promise<DescribeResult>;
|
|
26
26
|
dropObject?(connector: Connector, settings: DropSettings): Promise<void>;
|
|
27
27
|
findObject?(connector: Connector, findSettings: FindSettings): Promise<FindResult>;
|
|
28
|
-
|
|
28
|
+
getReader?(connector: Connector, getSettings: GetReaderSettings): Promise<GetReaderResult>;
|
|
29
|
+
getRecord?(connector: Connector, getSettings: GetRecordSettings): Promise<GetRecordResult>;
|
|
29
30
|
listNodes?(connector: Connector, settings: ListSettings): Promise<ListResult>;
|
|
30
31
|
previewObject?(connector: Connector, settings: PreviewSettings): Promise<PreviewResult>;
|
|
31
32
|
removeRecords?(connector: Connector, settings: RemoveSettings): Promise<void>;
|
|
32
33
|
retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
|
|
33
34
|
upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
|
|
34
35
|
}
|
|
35
|
-
export { connectorConfigSchema };
|
|
36
36
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
37
37
|
export interface ConnectorConfig1 extends ModuleConfig {
|
|
38
38
|
category: ConnectorCategory | null;
|
|
@@ -49,7 +49,7 @@ export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'descript
|
|
|
49
49
|
label: string;
|
|
50
50
|
description: string;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export interface ConnectorImplementation {
|
|
53
53
|
activeConnectionCount?: number;
|
|
54
54
|
canDescribe?: boolean;
|
|
55
55
|
id?: string;
|
|
@@ -57,12 +57,11 @@ export type ConnectorImplementation = {
|
|
|
57
57
|
label?: LocalisedString;
|
|
58
58
|
maxConnectionCount?: number;
|
|
59
59
|
params?: Record<string, string>[];
|
|
60
|
-
}
|
|
61
|
-
export
|
|
60
|
+
}
|
|
61
|
+
export interface ConnectorTools {
|
|
62
62
|
csvParse: typeof csvParse;
|
|
63
63
|
dataPos: {
|
|
64
64
|
buildFetchError: typeof buildFetchError;
|
|
65
|
-
convertMillisecondsToTimestamp: typeof convertMillisecondsToTimestamp;
|
|
66
65
|
extractExtensionFromPath: typeof extractExtensionFromPath;
|
|
67
66
|
extractNameFromPath: typeof extractNameFromPath;
|
|
68
67
|
lookupMimeTypeForExtension: typeof lookupMimeTypeForExtension;
|
|
@@ -72,7 +71,7 @@ export type ConnectorTools = {
|
|
|
72
71
|
parse: typeof dateFnsParse;
|
|
73
72
|
};
|
|
74
73
|
nanoid: typeof nanoid;
|
|
75
|
-
}
|
|
74
|
+
}
|
|
76
75
|
export interface InitialiseSettings {
|
|
77
76
|
connectorStorageURLPrefix: string;
|
|
78
77
|
}
|
|
@@ -95,8 +94,7 @@ export interface CreateSettings extends ConnectorOperationSettings {
|
|
|
95
94
|
path: string;
|
|
96
95
|
structure: string;
|
|
97
96
|
}
|
|
98
|
-
|
|
99
|
-
}
|
|
97
|
+
type DescribeSettings = ConnectorOperationSettings;
|
|
100
98
|
interface DescribeResult {
|
|
101
99
|
description: ConnectionDescription;
|
|
102
100
|
}
|
|
@@ -110,11 +108,18 @@ export interface FindSettings extends ConnectorOperationSettings {
|
|
|
110
108
|
export interface FindResult {
|
|
111
109
|
folderPath?: string;
|
|
112
110
|
}
|
|
113
|
-
export interface
|
|
111
|
+
export interface GetReaderSettings extends ConnectorOperationSettings {
|
|
112
|
+
id: string;
|
|
113
|
+
path: string;
|
|
114
|
+
}
|
|
115
|
+
export interface GetReaderResult {
|
|
116
|
+
record?: string[] | Record<string, unknown>;
|
|
117
|
+
}
|
|
118
|
+
export interface GetRecordSettings extends ConnectorOperationSettings {
|
|
114
119
|
id: string;
|
|
115
120
|
path: string;
|
|
116
121
|
}
|
|
117
|
-
export interface
|
|
122
|
+
export interface GetRecordResult {
|
|
118
123
|
record?: string[] | Record<string, unknown>;
|
|
119
124
|
}
|
|
120
125
|
export interface ListSettings extends ConnectorOperationSettings {
|
|
@@ -167,7 +172,9 @@ export interface ConnectorCallbackData {
|
|
|
167
172
|
typeId: string;
|
|
168
173
|
properties: Record<string, unknown>;
|
|
169
174
|
}
|
|
170
|
-
|
|
175
|
+
interface ConnectorCategory {
|
|
171
176
|
id: string;
|
|
172
177
|
label: string;
|
|
173
|
-
}
|
|
178
|
+
}
|
|
179
|
+
/** Exposures */
|
|
180
|
+
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context schema.
|
|
3
|
+
* Drafted by Copilot.
|
|
4
|
+
*/
|
|
1
5
|
export declare const contextConfigSchema: import('valibot').ObjectSchema<{
|
|
2
6
|
readonly typeId: import('valibot').LiteralSchema<"context", undefined>;
|
|
3
7
|
readonly models: import('valibot').ArraySchema<import('valibot').ObjectSchema<{
|
|
@@ -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;
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import { componentConfigSchema } from './componentConfig.schema';
|
|
3
|
-
import { LocaleCode, LocalisedString
|
|
2
|
+
import { componentConfigSchema, componentStatusColorIdSchema, componentStatusIdSchema, componentStatusSchema, componentTypeIdSchema } from './componentConfig.schema';
|
|
3
|
+
import { LocaleCode, LocalisedString } 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
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
icon: string | null;
|
|
15
|
-
iconDark: string | null;
|
|
16
|
-
lastUpdatedAt: number | null;
|
|
17
|
-
status: ComponentStatus | null;
|
|
18
|
-
statusId: ComponentStatusId;
|
|
19
|
-
typeId: ComponentTypeId;
|
|
20
|
-
}
|
|
21
|
-
export type ComponentRef = {
|
|
8
|
+
export type ComponentStatus = InferOutput<typeof componentStatusSchema>;
|
|
9
|
+
export type ComponentStatusColorId = InferOutput<typeof componentStatusColorIdSchema>;
|
|
10
|
+
export type ComponentStatusId = InferOutput<typeof componentStatusIdSchema>;
|
|
11
|
+
export type ComponentTypeId = InferOutput<typeof componentTypeIdSchema>;
|
|
12
|
+
export interface ComponentReference {
|
|
22
13
|
id: string;
|
|
23
14
|
label: Partial<LocalisedString>;
|
|
24
15
|
description: Partial<LocalisedString>;
|
|
@@ -26,17 +17,12 @@ export type ComponentRef = {
|
|
|
26
17
|
iconDark: string | null;
|
|
27
18
|
order: number;
|
|
28
19
|
path: string;
|
|
29
|
-
}
|
|
30
|
-
export type ComponentStatus = {
|
|
31
|
-
id: string;
|
|
32
|
-
color: StatusColorId;
|
|
33
|
-
label: string;
|
|
34
|
-
};
|
|
35
|
-
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
20
|
+
}
|
|
36
21
|
export declare const getComponentStatus: (id: string, localeId?: LocaleCode) => ComponentStatus;
|
|
37
|
-
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';
|
|
38
22
|
export interface ModuleConfig extends ComponentConfig {
|
|
39
23
|
typeId: ModuleTypeId;
|
|
40
24
|
version: string;
|
|
41
25
|
}
|
|
42
26
|
export type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
|
|
27
|
+
/** Exposures */
|
|
28
|
+
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';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presenter schema.
|
|
3
|
+
* Drafted by Copilot.
|
|
4
|
+
*/
|
|
1
5
|
export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
2
6
|
readonly typeId: import('valibot').LiteralSchema<"presenter", undefined>;
|
|
3
7
|
readonly presentations: import('valibot').ArraySchema<import('valibot').ObjectSchema<{
|
|
@@ -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,61 +1,69 @@
|
|
|
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>;
|
|
6
|
-
|
|
7
|
+
/** Interfaces/Types - Component */
|
|
8
|
+
export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId, ComponentStatusColorId } from './component';
|
|
9
|
+
/** Schemas - Component */
|
|
7
10
|
export { componentConfigSchema } from './component';
|
|
8
|
-
|
|
9
|
-
export { connectorConfigSchema } from './component/connector';
|
|
10
|
-
export type { ConnectorOperation, ConnectorUsageId } from './component/connector';
|
|
11
|
+
/** Constants - Connector */
|
|
11
12
|
export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './component/connector';
|
|
12
|
-
|
|
13
|
-
export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation,
|
|
14
|
-
|
|
15
|
-
export type {
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
export type { ListResult, ListSettings } from './component/connector';
|
|
20
|
-
export type { PreviewResult, PreviewSettings } from './component/connector';
|
|
21
|
-
export type { RemoveSettings } from './component/connector';
|
|
22
|
-
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './component/connector';
|
|
23
|
-
export type { UpsertSettings } from './component/connector';
|
|
24
|
-
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
|
|
25
|
-
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
13
|
+
/** Interfaces/Types Component - Connector */
|
|
14
|
+
export type { AuditContentResult, AuditContentSettings, Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorLocalisedConfig, ConnectorOperation, ConnectorOperationSettings, ConnectorTools, ConnectorUsageId, CreateSettings, DropSettings, FindResult, FindSettings, GetReaderResult, GetReaderSettings, GetRecordResult, GetRecordSettings, InitialiseSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RemoveSettings, RetrieveResult, RetrieveSettings, RetrieveSummary, UpsertSettings } from './component/connector';
|
|
15
|
+
/** Interfaces/Types - Connection */
|
|
16
|
+
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
17
|
+
/** Schemas - Connector */
|
|
18
|
+
export { connectorConfigSchema } from './component/connector';
|
|
19
|
+
/** Interfaces/Types - Context. */
|
|
26
20
|
export { contextConfigSchema } from './component/context';
|
|
27
21
|
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
|
|
22
|
+
/** Interfaces/Types - Context model. */
|
|
28
23
|
export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
|
|
24
|
+
/** Interfaces/Types - Context model dimension. */
|
|
29
25
|
export type { ContextModelDimensionGroupConfig, ContextModelDimensionGroupLocalisedConfig, ContextModelDimensionConfig, ContextModelDimensionLocalisedConfig, ContextModelDimensionHierarchyConfig, ContextModelDimensionHierarchyLocalisedConfig } from './component/context';
|
|
26
|
+
/** Interfaces/Types - Context model entity. */
|
|
30
27
|
export type { ContextModelEntityGroupConfig, ContextModelEntityGroupLocalisedConfig, ContextModelEntityConfig, ContextModelEntityLocalisedConfig, ContextModelEntityDataItemConfig, // Data items.
|
|
31
28
|
ContextModelEntityDataItemLocalisedConfig, ContextModelEntityEventConfig, // Events.
|
|
32
29
|
ContextModelEntityEventLocalisedConfig, ContextModelEntityPrimaryMeasureConfig, // Primary measures.
|
|
33
30
|
ContextModelEntityPrimaryMeasureLocalisedConfig } from './component/context';
|
|
31
|
+
/** Interfaces/Types - Context model secondary measure. */
|
|
34
32
|
export type { ContextModelSecondaryMeasureGroupConfig, ContextModelSecondaryMeasureGroupLocalisedConfig, ContextModelSecondaryMeasureConfig, ContextModelSecondaryMeasureLocalisedConfig } from './component/context';
|
|
33
|
+
/** Interfaces/Types - Context Operator Settings */
|
|
34
|
+
export interface ContextOperationSettings {
|
|
35
|
+
accountId?: string;
|
|
36
|
+
appCheckToken?: string;
|
|
37
|
+
sessionAccessToken?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Interfaces/Types - Data view. */
|
|
35
40
|
export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId } from './component/dataView';
|
|
36
41
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './component/dataView';
|
|
42
|
+
/** Interfaces/Types - Dimension. */
|
|
37
43
|
export type { DimensionConfig, DimensionLocalisedConfig } from './component/dimension';
|
|
44
|
+
/** Interfaces/Types - Engine. */
|
|
38
45
|
export type { ConnectorInterfaceResult, ContextInterfaceResult, Engine, EngineConfig, EngineWorker, TestSettings } from './engine';
|
|
46
|
+
/** Interfaces/Types */
|
|
39
47
|
export type { SerialisedError } from './errors';
|
|
48
|
+
/** Errors */
|
|
49
|
+
export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
|
|
50
|
+
/** Utilities */
|
|
51
|
+
export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
|
|
52
|
+
/** Interfaces/Types - Event query. */
|
|
40
53
|
export type { EventQueryConfig, EventQueryLocalisedConfig } from './component/eventQuery';
|
|
54
|
+
/** Interfaces/Types */
|
|
41
55
|
export { presenterConfigSchema } from './component/presenter';
|
|
42
56
|
export type { Presenter, PresenterConfig, PresenterLocalisedConfig, PresenterOperation } from './component/presenter';
|
|
57
|
+
/** Interfaces/Types - Presenter presentation. */
|
|
43
58
|
export type { PresentationConfig, PresentationView } from './component/presenter/presentation';
|
|
44
59
|
export type { PresentationCategoryId, PresentationCartesianTypeId, PresentationPolarTypeId, PresentationRangeTypeId, PresentationVisualConfig, PresentationVisualContentConfig, PresentationVisualViewConfig, PresentationVisualCartesianChartViewConfig, PresentationVisualChordDiagramViewConfig, PresentationVisualPeriodFlowBoundariesChartViewConfig, PresentationVisualPolarChartViewConfig, PresentationVisualRangeChartViewConfig, PresentationVisualSankeyDiagramViewConfig, PresentationVisualStreamGraphViewConfig, PresentationVisualValueTableViewConfig } from './component/presenter/presentation';
|
|
45
60
|
export type { ToolConfig } from './component/tool';
|
|
46
|
-
|
|
47
|
-
accountId?: string;
|
|
48
|
-
appCheckToken?: string;
|
|
49
|
-
sessionAccessToken?: string;
|
|
50
|
-
}
|
|
51
|
-
export type { Timestamp } from './timestamp';
|
|
61
|
+
/** Composables */
|
|
52
62
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
53
63
|
export { useDataTable } from './composables/useDataTable';
|
|
64
|
+
/** Constants */
|
|
54
65
|
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';
|
|
66
|
+
/** Utilities */
|
|
59
67
|
export { convertODataTypeIdToUsageTypeId } from './utilities';
|
|
60
68
|
export { extractExtensionFromPath, extractNameFromPath } from './utilities';
|
|
61
69
|
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.325",
|
|
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",
|
|
@@ -49,12 +49,14 @@
|
|
|
49
49
|
"license-report": "^6.8.1",
|
|
50
50
|
"license-report-check": "^0.1.2",
|
|
51
51
|
"license-report-recursive": "^6.8.2",
|
|
52
|
+
"md-to-pdf": "^5.2.5",
|
|
52
53
|
"nanoid": "^5.1.6",
|
|
53
54
|
"npm-check-updates": "^19.2.0",
|
|
54
55
|
"owasp-dependency-check": "^1.0.0",
|
|
55
56
|
"prettier": "^3.7.4",
|
|
56
57
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
57
58
|
"sonda": "^0.10.1",
|
|
59
|
+
"type-fest": "^5.3.1",
|
|
58
60
|
"typescript": "^5.9.3",
|
|
59
61
|
"valibot": "^1.2.0",
|
|
60
62
|
"vite": "^7.3.0",
|
|
@@ -70,7 +72,8 @@
|
|
|
70
72
|
"release": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.releaseProject())\"",
|
|
71
73
|
"sync": "node -e \"import('@datapos/datapos-development').then(m => m.syncProjectWithGitHub())\"",
|
|
72
74
|
"test": "node -e \"import('@datapos/datapos-development').then(m => m.testProject())\"",
|
|
73
|
-
"update": "node -e \"import('@datapos/datapos-development').then(m => m.updateDataPosDependencies(['development']))\""
|
|
75
|
+
"update": "node -e \"import('@datapos/datapos-development').then(m => m.updateDataPosDependencies(['development']))\"",
|
|
76
|
+
"_readmeToPDF": "md-to-pdf README.md"
|
|
74
77
|
},
|
|
75
78
|
"engines": {
|
|
76
79
|
"node": ">=22.0.0",
|