@datapos/datapos-shared 0.3.453 → 0.3.455

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { D as a } from "./locale-DR89RW6v.js";
1
+ import { D as a } from "./locale-DTTQsZic.js";
2
2
  import { c as s } from "./componentConfig.schema-DInGC5Y6.js";
3
3
  const n = [
4
4
  { id: "alpha", color: "red", labels: { "en-gb": "alpha" } },
@@ -1,4 +1,4 @@
1
- import { D as s } from "./locale-DR89RW6v.js";
1
+ import { D as s } from "./locale-DTTQsZic.js";
2
2
  import { l as n, o as i, n as a, b as d, r as b, d as p, s as e, e as o, f as l, g as C, h as g, p as u } from "./componentConfig.schema-DInGC5Y6.js";
3
3
  import { m as h } from "./moduleConfig.schema-BJfbCrO6.js";
4
4
  const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
@@ -1,8 +1,8 @@
1
- const e = (l) => new Map(Object.entries(l));
2
- e({ "en-gb": "Delimited Text" }), e({ "en-gb": "Entity/Event" }), e({ "en-gb": "JSON" }), e({ "en-gb": "SPSS" }), e({ "en-gb": "XLS" }), e({ "en-gb": "XLSX" }), e({ "en-gb": "XML" });
1
+ import { c as e } from "./locale-DTTQsZic.js";
2
+ e({ "en-gb": "Data Positioning Events" }), e({ "en-gb": "Delimited Text" }), e({ "en-gb": "JSON" }), e({ "en-gb": "SPSS" }), e({ "en-gb": "XLSX" }), e({ "en-gb": "XML" });
3
3
  e({ "en-gb": "Newline" }), e({ "en-gb": "Carriage Return" }), e({ "en-gb": "Carriage Return/Newline" });
4
4
  e({ "en-gb": "Colon" }), e({ "en-gb": "Comma" }), e({ "en-gb": "Exclamation Mark" }), e({ "en-gb": "Record Separator" }), e({ "en-gb": "Semicolon" }), e({ "en-gb": "Space" }), e({ "en-gb": "Tab" }), e({ "en-gb": "Underscore" }), e({ "en-gb": "Unit Separator" }), e({ "en-gb": "Vertical Bar" });
5
- const b = [",", ";", " ", "|", " ", ":", "_", "!", "0x1F", "0x1E"];
5
+ const a = [",", ";", " ", "|", " ", ":", "_", "!", "0x1F", "0x1E"];
6
6
  export {
7
- b as ORDERED_VALUE_DELIMITER_IDS
7
+ a as ORDERED_VALUE_DELIMITER_IDS
8
8
  };
@@ -0,0 +1,5 @@
1
+ const a = "en-gb", t = (e) => new Map(Object.entries(e));
2
+ export {
3
+ a as D,
4
+ t as c
5
+ };
@@ -1,28 +1,55 @@
1
1
  import { LiteralSchema, UnionSchema } from 'valibot';
2
+ /**
3
+ *
4
+ */
2
5
  type LiteralUnionSchema<T extends readonly string[]> = UnionSchema<{
3
6
  [K in keyof T]: LiteralSchema<T[K], undefined>;
4
7
  }, undefined>;
8
+ /**
9
+ *
10
+ */
5
11
  declare const literalUnion: <const T extends readonly string[]>(values: T) => LiteralUnionSchema<T>;
12
+ /**
13
+ *
14
+ */
6
15
  declare const localisedStringSchema: import('valibot').ObjectSchema<{
7
16
  readonly 'en-au': import('valibot').StringSchema<undefined>;
8
17
  readonly 'en-gb': import('valibot').StringSchema<undefined>;
9
18
  readonly 'en-us': import('valibot').StringSchema<undefined>;
10
19
  readonly 'es-es': import('valibot').StringSchema<undefined>;
11
20
  }, undefined>;
21
+ /**
22
+ *
23
+ */
12
24
  declare const partialLocalisedStringSchema: import('valibot').ObjectSchema<{
13
25
  readonly 'en-au': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
14
26
  readonly 'en-gb': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
15
27
  readonly 'en-us': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
16
28
  readonly 'es-es': import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
17
29
  }, undefined>;
30
+ /**
31
+ *
32
+ */
18
33
  declare const componentStatusColorIdSchema: LiteralUnionSchema<readonly ["amber", "green", "red", "other"]>;
34
+ /**
35
+ *
36
+ */
19
37
  declare const componentStatusIdSchema: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
38
+ /**
39
+ *
40
+ */
20
41
  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"]>;
42
+ /**
43
+ *
44
+ */
21
45
  declare const componentStatusSchema: import('valibot').ObjectSchema<{
22
46
  readonly id: import('valibot').StringSchema<undefined>;
23
47
  readonly color: LiteralUnionSchema<readonly ["amber", "green", "red", "other"]>;
24
48
  readonly label: import('valibot').StringSchema<undefined>;
25
49
  }, undefined>;
50
+ /**
51
+ *
52
+ */
26
53
  declare const componentConfigCoreFields: {
27
54
  readonly id: import('valibot').StringSchema<undefined>;
28
55
  readonly label: import('valibot').ObjectSchema<{
@@ -48,6 +75,9 @@ declare const componentConfigCoreFields: {
48
75
  }, undefined>, undefined>;
49
76
  readonly statusId: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
50
77
  };
78
+ /**
79
+ *
80
+ */
51
81
  declare const componentConfigSchema: import('valibot').ObjectSchema<{
52
82
  readonly typeId: 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"]>;
53
83
  readonly id: import('valibot').StringSchema<undefined>;
@@ -74,6 +104,9 @@ declare const componentConfigSchema: import('valibot').ObjectSchema<{
74
104
  }, undefined>, undefined>;
75
105
  readonly statusId: LiteralUnionSchema<readonly ["alpha", "beta", "generalAvailability", "notApplicable", "preAlpha", "proposed", "releaseCandidate", "unavailable", "underReview"]>;
76
106
  }, undefined>;
107
+ /**
108
+ *
109
+ */
77
110
  declare const componentReferenceSchema: import('valibot').ObjectSchema<{
78
111
  readonly id: import('valibot').StringSchema<undefined>;
79
112
  readonly label: import('valibot').ObjectSchema<{
@@ -93,5 +126,4 @@ declare const componentReferenceSchema: import('valibot').ObjectSchema<{
93
126
  readonly order: import('valibot').NumberSchema<undefined>;
94
127
  readonly path: import('valibot').StringSchema<undefined>;
95
128
  }, undefined>;
96
- /** Exports. */
97
129
  export { componentConfigCoreFields, componentConfigSchema, componentReferenceSchema, componentStatusColorIdSchema, componentStatusIdSchema, componentStatusSchema, componentTypeIdSchema, literalUnion, localisedStringSchema, partialLocalisedStringSchema };
@@ -1,5 +1,12 @@
1
1
  import { ComponentConfig } from '..';
2
2
  import { ConnectorConfig } from '.';
3
+ /** Connection configuration. */
4
+ interface ConnectionConfig extends ComponentConfig {
5
+ authorisation: Record<string, ConnectionAuthorisationConfig>;
6
+ connectorConfig: ConnectorConfig;
7
+ lastVerifiedAt: number;
8
+ notation?: string;
9
+ }
3
10
  /** Connection authorisation configuration. */
4
11
  interface ConnectionAuthorisationConfig {
5
12
  accessToken: string;
@@ -11,13 +18,6 @@ interface ConnectionAuthorisationConfig {
11
18
  tokenType: string;
12
19
  uid: string;
13
20
  }
14
- /** Connection configuration. */
15
- interface ConnectionConfig extends ComponentConfig {
16
- authorisation: Record<string, ConnectionAuthorisationConfig>;
17
- connectorConfig: ConnectorConfig;
18
- lastVerifiedAt: number;
19
- notation?: string;
20
- }
21
21
  /** Connection node configuration. */
22
22
  interface ConnectionNodeConfig {
23
23
  childCount?: number;
@@ -8,6 +8,9 @@
8
8
  declare const connectorOperationNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObjectFolderPath", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>;
9
9
  /** Connector data pipeline usage identifiers. */
10
10
  declare const connectorUsageIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"bidirectional", undefined>, import('valibot').LiteralSchema<"destination", undefined>, import('valibot').LiteralSchema<"source", undefined>, import('valibot').LiteralSchema<"unknown", undefined>], undefined>;
11
+ /**
12
+ *
13
+ */
11
14
  declare const connectorCategoryConfigSchema: import('valibot').ObjectSchema<{
12
15
  readonly id: import('valibot').StringSchema<undefined>;
13
16
  readonly label: import('valibot').ObjectSchema<{
@@ -74,5 +77,4 @@ declare const connectorConfigSchema: import('valibot').ObjectSchema<{
74
77
  }, undefined>, undefined>;
75
78
  readonly statusId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
76
79
  }, undefined>;
77
- /** Exports. */
78
80
  export { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema };
@@ -4,7 +4,7 @@ import { EngineUtilities } from '../../engine';
4
4
  import { ToolConfig } from '../tool';
5
5
  import { ConnectionDescription, ConnectionNodeConfig } from './connection';
6
6
  import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
7
- import { DataViewPreviewConfig, ValueDelimiterId } from '../dataView';
7
+ import { DataViewPreviewConfig, RecordValueDelimiterId } from '../dataView';
8
8
  /**
9
9
  * Connector interface and constructor.
10
10
  */
@@ -12,21 +12,66 @@ interface ConnectorInterface extends Component {
12
12
  abortController: AbortController | undefined;
13
13
  readonly config: ConnectorConfig;
14
14
  readonly toolConfigs: ToolConfig[];
15
+ /**
16
+ * Abort the active long running operation.
17
+ */
15
18
  abortOperation?(connector: ConnectorInterface): void;
19
+ /**
20
+ * Authenticate a specified connection.
21
+ */
16
22
  authenticateConnection?(accountId: string, windowCenterX: number, windowCenterY: number): Window;
23
+ /**
24
+ * Create an object for a specified connection.
25
+ */
17
26
  createObject?(connector: ConnectorInterface, options: CreateObjectOptions): Promise<void>;
27
+ /**
28
+ * Describe a specified connection.
29
+ */
18
30
  describeConnection?(connector: ConnectorInterface, options: DescribeConnectionOptions): Promise<DescribeConnectionResult>;
31
+ /**
32
+ * Drop (delete) an object for a specified connection.
33
+ */
19
34
  dropObject?(connector: ConnectorInterface, options: DropObjectOptions): Promise<void>;
35
+ /**
36
+ * Find an object for a specified connection.
37
+ */
20
38
  findObject?(connector: ConnectorInterface, options: FindObjectFolderPathOptions): Promise<string | null>;
39
+ /**
40
+ * Get a reader that can retrieve all records from an object for a specified connection.
41
+ */
21
42
  getReadableStream?(connector: ConnectorInterface, options: GetReadableStreamOptions): Promise<ReadableStream<Uint8Array>>;
43
+ /**
44
+ * Get a record for an object for a specified connection.
45
+ */
22
46
  getRecord?(connector: ConnectorInterface, options: GetRecordOptions): Promise<GetRecordResult>;
47
+ /**
48
+ * List nodes in a folder for a specified connection.
49
+ */
23
50
  listNodes?(connector: ConnectorInterface, options: ListNodesOptions): Promise<ListNodesResult>;
51
+ /**
52
+ * Preview an object for a specified connection.
53
+ */
24
54
  previewObject?(connector: ConnectorInterface, options: PreviewObjectOptions): Promise<DataViewPreviewConfig>;
55
+ /**
56
+ * Remove one or more records from an object for a specified connection.
57
+ */
25
58
  removeRecords?(connector: ConnectorInterface, options: RemoveRecordsOptions): Promise<void>;
59
+ /**
60
+ * Retrieve all chunks from an object for a specified connection.
61
+ */
26
62
  retrieveChunks?(connector: ConnectorInterface, options: RetrieveChunksOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: () => void): Promise<void>;
63
+ /**
64
+ * Retrieve all records from an object for a specified connection.
65
+ */
27
66
  retrieveRecords?(connector: ConnectorInterface, options: RetrieveRecordsOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
67
+ /**
68
+ * Upsert one or more records into an object for a specified connection.
69
+ */
28
70
  upsertRecords?(connector: ConnectorInterface, options: UpsertRecordsOptions): Promise<void>;
29
71
  }
72
+ /**
73
+ *
74
+ */
30
75
  type ConnectorConstructor = new (EngineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
31
76
  /**
32
77
  * Operation names a connector may support.
@@ -133,7 +178,7 @@ interface RetrieveChunksOptions extends ConnectorOperationOptions {
133
178
  chunkSize?: number;
134
179
  encodingId: string;
135
180
  path: string;
136
- valueDelimiterId: ValueDelimiterId;
181
+ valueDelimiterId: RecordValueDelimiterId;
137
182
  }
138
183
  /**
139
184
  * Retrieve records options and summary.
@@ -142,14 +187,33 @@ interface RetrieveRecordsOptions extends ConnectorOperationOptions {
142
187
  chunkSize?: number;
143
188
  encodingId: string;
144
189
  path: string;
145
- valueDelimiterId: ValueDelimiterId;
190
+ valueDelimiterId: RecordValueDelimiterId;
146
191
  }
147
192
  interface RetrieveRecordsSummary {
193
+ /**
194
+ * Number of processed bytes.
195
+ */
148
196
  byteCount: number;
197
+ /**
198
+ * Count the number of lines being fully commented.
199
+ */
149
200
  commentLineCount: number;
201
+ /**
202
+ * Count the number of processed empty lines; work only with the skip_empty_lines option or an error will be thrown
203
+ * if an empty line is found.
204
+ */
150
205
  emptyLineCount: number;
206
+ /**
207
+ * Number of lines encountered in the source dataset, start at 1 for the first line.
208
+ */
151
209
  lineCount: number;
210
+ /**
211
+ * Number of non uniform records when relax_column_count is true.
212
+ */
152
213
  nonUniformRecordCount: number;
214
+ /**
215
+ * Count the number of processed records.
216
+ */
153
217
  recordCount: number;
154
218
  }
155
219
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Context schema (drafted by Copilot).
2
+ * Context schema.
3
3
  */
4
4
  export declare const contextConfigSchema: import('valibot').ObjectSchema<{
5
5
  readonly typeId: import('valibot').LiteralSchema<"context", undefined>;
@@ -12,10 +12,6 @@ export type ContextListOptions = object;
12
12
  export interface ContextListResult {
13
13
  models: ContextModelGroupConfig[];
14
14
  }
15
- export interface ContextCallbackData {
16
- typeId: string;
17
- properties: Record<string, unknown>;
18
- }
19
15
  export type ContextConfig = InferOutput<typeof contextConfigSchema>;
20
16
  export interface ContextConfig1 extends ModuleConfig {
21
17
  models: ContextModelGroupConfig[];
@@ -1,6 +1,10 @@
1
1
  import { FileTypeResult } from 'file-type';
2
- import { ComponentConfig } from '..';
2
+ import { Component, ComponentConfig } from '..';
3
3
  import { ConnectionColumnConfig, ConnectionNodeConfig, UsageTypeId } from '../connector/connection';
4
+ /**
5
+ * Data view interface.
6
+ */
7
+ type DataViewInterface = Component;
4
8
  /**
5
9
  * Data view configuration.
6
10
  */
@@ -12,36 +16,43 @@ interface DataViewConfig extends ComponentConfig {
12
16
  relationshipsAuditConfig?: DataViewRelationshipsAuditConfig;
13
17
  }
14
18
  /**
15
- * Data view content audit configuration.
19
+ * Data view localised configuration.
16
20
  */
17
- interface DataViewContentAuditConfig {
18
- asAt: number;
19
- columns: ConnectionColumnConfig[];
20
- commentLineCount: number;
21
- emptyLineCount: number;
22
- invalidFieldLengthCount: number;
23
- duration: number;
24
- lineCount: number;
25
- recordCount: number;
26
- }
21
+ type DataViewLocalisedConfig = Omit<DataViewConfig, 'label' | 'description'> & {
22
+ label: string;
23
+ description: string;
24
+ };
27
25
  /**
28
26
  * Data view preview configuration.
29
27
  */
30
28
  interface DataViewPreviewConfig {
31
29
  asAt: number;
32
30
  columnConfigs: ConnectionColumnConfig[];
33
- dataFormatId: DataFormatId | undefined;
31
+ dataFormatId: ObjectDataFormatId | undefined;
34
32
  duration: number;
35
33
  encodingConfidenceLevel: number | undefined;
36
34
  encodingId: string | undefined;
37
35
  errorMessage?: string;
38
36
  fileType: FileTypeResult | undefined;
39
37
  hasHeaders: boolean | undefined;
40
- recordDelimiterId?: RecordDelimiterId;
38
+ recordDelimiterId?: ObjectRecordDelimiterId;
41
39
  records: ParseResult[][];
42
40
  size: number;
43
41
  text: string;
44
- valueDelimiterId?: ValueDelimiterId;
42
+ valueDelimiterId?: RecordValueDelimiterId;
43
+ }
44
+ /**
45
+ * Data view content audit configuration.
46
+ */
47
+ interface DataViewContentAuditConfig {
48
+ asAt: number;
49
+ columns: ConnectionColumnConfig[];
50
+ commentLineCount: number;
51
+ emptyLineCount: number;
52
+ invalidFieldLengthCount: number;
53
+ duration: number;
54
+ lineCount: number;
55
+ recordCount: number;
45
56
  }
46
57
  /**
47
58
  * Data view relationships audit configuration.
@@ -49,7 +60,13 @@ interface DataViewPreviewConfig {
49
60
  interface DataViewRelationshipsAuditConfig {
50
61
  placeholder?: string;
51
62
  }
52
- declare const ORDERED_VALUE_DELIMITER_IDS: ValueDelimiterId[];
63
+ type ObjectDataFormatId = 'dpe' | 'dtv' | 'json' | 'spss' | 'xlsx' | 'xml';
64
+ type ObjectRecordDelimiterId = '\n' | '\r' | '\r\n';
65
+ type RecordValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
66
+ /**
67
+ *
68
+ */
69
+ declare const ORDERED_VALUE_DELIMITER_IDS: RecordValueDelimiterId[];
53
70
  /**
54
71
  * Parsed value.
55
72
  */
@@ -63,8 +80,14 @@ interface ParseResult {
63
80
  parsedValue: ParsedValue;
64
81
  usageTypeId: UsageTypeId;
65
82
  }
66
- type DataFormatId = 'dtv' | 'e/e' | 'json' | 'spss' | 'xls' | 'xlsx' | 'xml';
67
- type RecordDelimiterId = '\n' | '\r' | '\r\n';
68
- type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
83
+ type ValueDataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal';
84
+ type ValueNumericTypeId = 'bigint' | 'integer' | 'decimal';
85
+ type ValueNumericUnitsId = 'currency' | 'percentage' | 'plain';
86
+ type ValueStringTypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
87
+ type ValueTemporalTypeId = 'date' | 'dateTime' | 'time';
69
88
  export { ORDERED_VALUE_DELIMITER_IDS };
70
- export type { DataFormatId, DataViewContentAuditConfig, DataViewConfig, DataViewPreviewConfig, ParseResult, RecordDelimiterId, ValueDelimiterId };
89
+ export type { DataViewInterface, DataViewConfig, DataViewLocalisedConfig };
90
+ export type { DataViewContentAuditConfig, DataViewPreviewConfig };
91
+ export type { ParseResult };
92
+ export type { ObjectDataFormatId, ObjectRecordDelimiterId, RecordValueDelimiterId };
93
+ export type { ValueDataTypeId, ValueNumericTypeId, ValueNumericUnitsId, ValueStringTypeId, ValueTemporalTypeId };
@@ -1,9 +1,13 @@
1
1
  /**
2
2
  * Module configuration schema.
3
3
  */
4
- /** */
4
+ /**
5
+ *
6
+ */
5
7
  declare const moduleTypeIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"app", undefined>, import('valibot').LiteralSchema<"engine", undefined>, import('valibot').LiteralSchema<"connector", undefined>, import('valibot').LiteralSchema<"context", undefined>, import('valibot').LiteralSchema<"presenter", undefined>, import('valibot').LiteralSchema<"tool", undefined>], undefined>;
6
- /** */
8
+ /**
9
+ *
10
+ */
7
11
  declare const moduleConfigCoreFields: {
8
12
  readonly version: import('valibot').StringSchema<undefined>;
9
13
  readonly id: import('valibot').StringSchema<undefined>;
@@ -30,7 +34,9 @@ declare const moduleConfigCoreFields: {
30
34
  }, undefined>, undefined>;
31
35
  readonly statusId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
32
36
  };
33
- /** */
37
+ /**
38
+ *
39
+ */
34
40
  declare const moduleConfigSchema: import('valibot').ObjectSchema<{
35
41
  readonly typeId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"app", undefined>, import('valibot').LiteralSchema<"engine", undefined>, import('valibot').LiteralSchema<"connector", undefined>, import('valibot').LiteralSchema<"context", undefined>, import('valibot').LiteralSchema<"presenter", undefined>, import('valibot').LiteralSchema<"tool", undefined>], undefined>;
36
42
  readonly version: import('valibot').StringSchema<undefined>;
@@ -58,5 +64,4 @@ declare const moduleConfigSchema: import('valibot').ObjectSchema<{
58
64
  }, undefined>, undefined>;
59
65
  readonly statusId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"alpha", undefined>, import('valibot').LiteralSchema<"beta", undefined>, import('valibot').LiteralSchema<"generalAvailability", undefined>, import('valibot').LiteralSchema<"notApplicable", undefined>, import('valibot').LiteralSchema<"preAlpha", undefined>, import('valibot').LiteralSchema<"proposed", undefined>, import('valibot').LiteralSchema<"releaseCandidate", undefined>, import('valibot').LiteralSchema<"unavailable", undefined>, import('valibot').LiteralSchema<"underReview", undefined>], undefined>;
60
66
  }, undefined>;
61
- /** Exports. */
62
67
  export { moduleConfigCoreFields, moduleConfigSchema, moduleTypeIdSchema };
@@ -3,8 +3,8 @@ import { EncodingTypeConfig } from '../encoding';
3
3
  import { ModuleConfig } from '../component/module';
4
4
  import { ToolConfig } from '../component/tool';
5
5
  import { ConnectionColumnConfig, ConnectorOperationOptions } from '../component/connector';
6
- import { ContextCallbackData, ContextConfig, ContextOperationOptions } from '../component/context';
7
- import { DataViewContentAuditConfig, ParseResult, ValueDelimiterId } from '../component/dataView';
6
+ import { ContextConfig, ContextOperationOptions } from '../component/context';
7
+ import { DataViewContentAuditConfig, ParseResult, RecordValueDelimiterId } from '../component/dataView';
8
8
  /**
9
9
  * Engine runtime interface.
10
10
  */
@@ -17,8 +17,8 @@ interface EngineRuntimeInterface {
17
17
  */
18
18
  interface EngineWorkerInterface {
19
19
  initialise: (options: EngineWorkerInitialiseOptions) => Promise<void>;
20
- processConnectorRequest: (id: string, connectionConfig: ConnectionConfig, options: ConnectorOperationOptions, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<unknown>;
21
- processContextRequest: (id: string, contextConfig: ContextConfig, options: ContextOperationOptions, callback?: (callbackData: ContextCallbackData) => void) => Promise<unknown>;
20
+ processConnectorRequest: (id: string, connectionConfig: ConnectionConfig, options: ConnectorOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
21
+ processContextRequest: (id: string, contextConfig: ContextConfig, options: ContextOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
22
22
  processTestRequest: (settings: TestSettings) => Promise<Record<string, unknown>>;
23
23
  }
24
24
  /** Engine worker initialise options. */
@@ -26,15 +26,6 @@ interface EngineWorkerInitialiseOptions {
26
26
  connectorStorageURLPrefix: string;
27
27
  toolConfigs: ToolConfig[];
28
28
  }
29
- /**
30
- * Engine shared.
31
- */
32
- interface EngineUtilities {
33
- parseRecord: (columnConfigs: ConnectionColumnConfig[], record: {
34
- value: string | null | undefined;
35
- isQuoted: boolean;
36
- }[], isPreview: boolean) => ParseResult[];
37
- }
38
29
  /**
39
30
  * Engine configuration.
40
31
  */
@@ -42,12 +33,21 @@ interface EngineConfig extends ModuleConfig {
42
33
  typeId: 'engine';
43
34
  }
44
35
  /**
45
- * Connector callback data.
36
+ * Engine callback data.
46
37
  */
47
- interface ConnectorCallbackData {
38
+ interface EngineCallbackData {
48
39
  typeId: string;
49
40
  properties: Record<string, unknown>;
50
41
  }
42
+ /**
43
+ * Engine utilities.
44
+ */
45
+ interface EngineUtilities {
46
+ parseRecord: (columnConfigs: ConnectionColumnConfig[], record: {
47
+ value: string | null | undefined;
48
+ isQuoted: boolean;
49
+ }[], isPreview: boolean) => ParseResult[];
50
+ }
51
51
  /**
52
52
  * Audit object content options and result.
53
53
  */
@@ -55,7 +55,7 @@ interface AuditObjectContentOptions extends ConnectorOperationOptions {
55
55
  chunkSize: number | undefined;
56
56
  encodingId: string;
57
57
  path: string;
58
- valueDelimiterId: ValueDelimiterId;
58
+ valueDelimiterId: RecordValueDelimiterId;
59
59
  }
60
60
  interface AuditObjectContentResult {
61
61
  contentAuditConfig: DataViewContentAuditConfig;
@@ -67,4 +67,4 @@ interface TestSettings {
67
67
  hasHeaders?: boolean;
68
68
  readable: ReadableStream<Uint8Array>;
69
69
  }
70
- export type { AuditObjectContentOptions, AuditObjectContentResult, ConnectorCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface, TestSettings };
70
+ export type { AuditObjectContentOptions, AuditObjectContentResult, EngineCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface, TestSettings };
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /** Interfaces/Types - Context. */
5
5
  export { contextConfigSchema } from './component/context';
6
- export type { Context, ContextConfig, ContextLocalisedConfig, ContextListOptions, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
6
+ export type { Context, ContextConfig, ContextLocalisedConfig, ContextListOptions, ContextListResult, ContextOperation } from './component/context';
7
7
  /** Interfaces/Types - Context model. */
8
8
  export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
9
9
  /** Interfaces/Types - Context model dimension. */
@@ -1,12 +1,26 @@
1
1
  /**
2
2
  * Locale constants and type declarations.
3
3
  */
4
- /** Constants */
5
4
  declare const DEFAULT_LOCALE_CODE: LocaleCode;
6
- /** Locale codes. */
5
+ /**
6
+ * Locale codes.
7
+ */
7
8
  type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
8
- /** Localised string. */
9
+ /**
10
+ * Localised string.
11
+ */
9
12
  type LocalisedString = Record<LocaleCode, string>;
10
- /** Exports. */
11
- export { DEFAULT_LOCALE_CODE };
12
- export type { LocaleCode, LocalisedString };
13
+ /**
14
+ *
15
+ */
16
+ type LocaleLabelMap = ReadonlyMap<string, string>;
17
+ /**
18
+ *
19
+ */
20
+ declare const createLabelMap: (labels: Record<string, string>) => LocaleLabelMap;
21
+ /**
22
+ *
23
+ */
24
+ declare const resolveLabel: (labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: "en-gb") => string | undefined;
25
+ export { createLabelMap, DEFAULT_LOCALE_CODE, resolveLabel };
26
+ export type { LocaleCode, LocaleLabelMap, LocalisedString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.453",
3
+ "version": "0.3.455",
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>",
@@ -1,4 +0,0 @@
1
- const D = "en-gb";
2
- export {
3
- D
4
- };