@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.
@@ -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 statusColorIdSchema: LiteralUnionSchema<readonly ["amber", "green", "red", "other"]>;
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 componentRefSchema: import('valibot').ObjectSchema<{
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: Timestamp;
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: Timestamp;
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?: Timestamp;
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 type DPAFileSystemFileHandle = {
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 | undefined;
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
- getRecord?(connector: Connector, getSettings: GetSettings): Promise<GetResult>;
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 type ConnectorImplementation = {
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 type ConnectorTools = {
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
- interface DescribeSettings extends ConnectorOperationSettings {
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 GetSettings extends ConnectorOperationSettings {
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 GetResult {
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
- type ConnectorCategory = {
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, ComponentRef, ModuleConfig } from '..';
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 type ContextListResult = {
9
+ export type ContextOperationSettings = object;
10
+ export type ContextListSettings = object;
11
+ export interface ContextListResult {
12
12
  models: ContextModelGroupConfig[];
13
- };
14
- export type ContextCallbackData = {
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: ComponentRef[];
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: ComponentRef[];
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: ComponentRef[];
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: ComponentRef[];
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 type ParsedValue = {
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 interface DataView extends Component {
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: Timestamp;
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: Timestamp;
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
- type DataFormat = {
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
- type RecordDelimiter = {
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
- type ValueDelimiter = {
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, StatusColorId } from '../index';
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 interface ComponentConfig1 {
10
- id: string;
11
- label: Partial<LocalisedString>;
12
- description: Partial<LocalisedString>;
13
- firstCreatedAt?: number;
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, ComponentRef, ModuleConfig } from '..';
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(): ComponentRef[];
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: ComponentRef[];
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 type PresentationVisualConfig = {
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?: ((callbackData: ContextCallbackData) => void) | undefined) => Promise<ConnectorInterfaceResult>;
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?: ((callbackData: ConnectorCallbackData) => void) | undefined) => Promise<ContextInterfaceResult>;
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 type TestSettings = {
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, types/interfaces, errors and utilities.
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
- export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
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
- export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId } from './component';
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
- export type { AuditContentResult, AuditContentSettings } from './component/connector';
13
- export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './component/connector';
14
- export type { CreateSettings } from './component/connector';
15
- export type { DropSettings } from './component/connector';
16
- export type { FindResult, FindSettings } from './component/connector';
17
- export type { GetResult, GetSettings } from './component/connector';
18
- export type { InitialiseSettings } from './component/connector';
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
- export interface ContextOperationSettings {
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
- export { DefaultTimestamp } from './timestamp';
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.317",
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.389",
37
- "@datapos/eslint-config-datapos": "^1.0.18",
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",
@@ -1,4 +0,0 @@
1
- export type Timestamp = number;
2
- export declare const DefaultTimestamp: Timestamp;
3
- export declare const convertMillisecondsToTimestamp: (milliseconds: number) => Timestamp;
4
- export declare const getCurrentTimestamp: () => Timestamp;