@datapos/datapos-shared 0.3.456 → 0.3.458
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/dist/datapos-shared-component.es.js +1 -1
- package/dist/datapos-shared-connector.es.js +5 -5
- package/dist/datapos-shared-dataview.es.js +1 -1
- package/dist/datapos-shared-locale.es.js +11 -0
- package/dist/types/src/component/connector/index.d.ts +15 -15
- package/dist/types/src/component/dataView/index.d.ts +19 -18
- package/dist/types/src/component/index.d.ts +0 -1
- package/package.json +5 -1
- package/dist/locale-DTTQsZic.js +0 -5
- /package/dist/types/src/{locale.d.ts → locale/index.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_LOCALE_CODE as s } from "./datapos-shared-locale.es.js";
|
|
2
2
|
import { l as n, o as i, f as a, b as d, r as b, d as p, s as e, g as o, n as l, h as C, i as g, p as u } from "./componentConfig.schema-C0C6ceb5.js";
|
|
3
3
|
import { m as h } from "./moduleConfig.schema-DNq1iU4S.js";
|
|
4
4
|
const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
@@ -24,13 +24,13 @@ const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
|
24
24
|
"retrieveChunks",
|
|
25
25
|
"retrieveRecords",
|
|
26
26
|
"upsertRecords"
|
|
27
|
-
]), y = n(["bidirectional", "destination", "source", "unknown"]),
|
|
27
|
+
]), y = n(["bidirectional", "destination", "source", "unknown"]), I = i({
|
|
28
28
|
id: e(),
|
|
29
29
|
label: u
|
|
30
30
|
}), U = i({
|
|
31
31
|
...h,
|
|
32
32
|
typeId: p("connector"),
|
|
33
|
-
category: a(
|
|
33
|
+
category: a(I),
|
|
34
34
|
categoryId: O,
|
|
35
35
|
implementations: b(e(), f),
|
|
36
36
|
operations: d(R),
|
|
@@ -38,13 +38,13 @@ const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
|
38
38
|
vendorAccountURL: a(e()),
|
|
39
39
|
vendorDocumentationURL: a(e()),
|
|
40
40
|
vendorHomeURL: a(e())
|
|
41
|
-
}),
|
|
41
|
+
}), v = [
|
|
42
42
|
{ id: "application", label: { "en-gb": "Application" } },
|
|
43
43
|
{ id: "curatedDataset", label: { "en-gb": "Curated Dataset" } },
|
|
44
44
|
{ id: "database", label: { "en-gb": "Database" } },
|
|
45
45
|
{ id: "fileStore", label: { "en-gb": "File Store" } }
|
|
46
46
|
], j = (c, m = s) => {
|
|
47
|
-
const t =
|
|
47
|
+
const t = v.find((r) => r.id === c);
|
|
48
48
|
if (t) {
|
|
49
49
|
const r = t.label[m] ?? t.label[s] ?? t.id;
|
|
50
50
|
return { id: t.id, label: r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createLabelMap as e } from "./datapos-shared-locale.es.js";
|
|
2
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" });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = "en-gb", i = (e) => new Map(Object.entries(e)), s = (e, t, n = o) => {
|
|
2
|
+
const r = e.get(t);
|
|
3
|
+
if (r !== void 0) return r;
|
|
4
|
+
if (n !== t)
|
|
5
|
+
return e.get(n);
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as DEFAULT_LOCALE_CODE,
|
|
9
|
+
i as createLabelMap,
|
|
10
|
+
s as resolveLabel
|
|
11
|
+
};
|
|
@@ -4,7 +4,7 @@ import { EngineUtilities } from '../../engine';
|
|
|
4
4
|
import { ToolConfig } from '../tool';
|
|
5
5
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig } from './connection';
|
|
6
6
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
|
-
import { DataViewPreviewConfig, RecordValueDelimiterId } from '../dataView';
|
|
7
|
+
import { DataViewPreviewConfig, ObjectRecord, RecordValueDelimiterId } from '../dataView';
|
|
8
8
|
/**
|
|
9
9
|
* Connector interface and constructor.
|
|
10
10
|
*/
|
|
@@ -15,7 +15,7 @@ interface ConnectorInterface extends Component {
|
|
|
15
15
|
/**
|
|
16
16
|
* Abort the active long running operation.
|
|
17
17
|
*/
|
|
18
|
-
abortOperation?(
|
|
18
|
+
abortOperation?(): void;
|
|
19
19
|
/**
|
|
20
20
|
* Authenticate a specified connection.
|
|
21
21
|
*/
|
|
@@ -23,56 +23,56 @@ interface ConnectorInterface extends Component {
|
|
|
23
23
|
/**
|
|
24
24
|
* Create an object for a specified connection.
|
|
25
25
|
*/
|
|
26
|
-
createObject?(
|
|
26
|
+
createObject?(options: CreateObjectOptions): Promise<void>;
|
|
27
27
|
/**
|
|
28
28
|
* Describe a specified connection.
|
|
29
29
|
*/
|
|
30
|
-
describeConnection?(
|
|
30
|
+
describeConnection?(options: DescribeConnectionOptions): Promise<DescribeConnectionResult>;
|
|
31
31
|
/**
|
|
32
32
|
* Drop (delete) an object for a specified connection.
|
|
33
33
|
*/
|
|
34
|
-
dropObject?(
|
|
34
|
+
dropObject?(options: DropObjectOptions): Promise<void>;
|
|
35
35
|
/**
|
|
36
36
|
* Find an object for a specified connection.
|
|
37
37
|
*/
|
|
38
|
-
findObject?(
|
|
38
|
+
findObject?(options: FindObjectFolderPathOptions): Promise<string | null>;
|
|
39
39
|
/**
|
|
40
40
|
* Get a reader that can retrieve all records from an object for a specified connection.
|
|
41
41
|
*/
|
|
42
|
-
getReadableStream?(
|
|
42
|
+
getReadableStream?(options: GetReadableStreamOptions): Promise<ReadableStream<Uint8Array>>;
|
|
43
43
|
/**
|
|
44
44
|
* Get a record for an object for a specified connection.
|
|
45
45
|
*/
|
|
46
|
-
getRecord?(
|
|
46
|
+
getRecord?(options: GetRecordOptions): Promise<GetRecordResult>;
|
|
47
47
|
/**
|
|
48
48
|
* List nodes in a folder for a specified connection.
|
|
49
49
|
*/
|
|
50
|
-
listNodes?(
|
|
50
|
+
listNodes?(options: ListNodesOptions): Promise<ListNodesResult>;
|
|
51
51
|
/**
|
|
52
52
|
* Preview an object for a specified connection.
|
|
53
53
|
*/
|
|
54
|
-
previewObject?(
|
|
54
|
+
previewObject?(options: PreviewObjectOptions): Promise<DataViewPreviewConfig>;
|
|
55
55
|
/**
|
|
56
56
|
* Remove one or more records from an object for a specified connection.
|
|
57
57
|
*/
|
|
58
|
-
removeRecords?(
|
|
58
|
+
removeRecords?(options: RemoveRecordsOptions): Promise<void>;
|
|
59
59
|
/**
|
|
60
60
|
* Retrieve all chunks from an object for a specified connection.
|
|
61
61
|
*/
|
|
62
|
-
retrieveChunks?(
|
|
62
|
+
retrieveChunks?(options: RetrieveChunksOptions, chunk: (records: ObjectRecord[]) => void, complete: () => void): Promise<void>;
|
|
63
63
|
/**
|
|
64
64
|
* Retrieve all records from an object for a specified connection.
|
|
65
65
|
*/
|
|
66
|
-
retrieveRecords?(
|
|
66
|
+
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (records: ObjectRecord[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
67
67
|
/**
|
|
68
68
|
* Upsert one or more records into an object for a specified connection.
|
|
69
69
|
*/
|
|
70
|
-
upsertRecords?(
|
|
70
|
+
upsertRecords?(options: UpsertRecordsOptions): Promise<void>;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
*/
|
|
75
|
-
type ConnectorConstructor = new (
|
|
75
|
+
type ConnectorConstructor = new (engineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
76
76
|
/**
|
|
77
77
|
* Operation names a connector may support.
|
|
78
78
|
*/
|
|
@@ -67,27 +67,28 @@ type RecordValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' |
|
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
69
|
declare const ORDERED_VALUE_DELIMITER_IDS: RecordValueDelimiterId[];
|
|
70
|
-
|
|
71
|
-
* Parsed value.
|
|
72
|
-
*/
|
|
73
|
-
type ParsedValue = bigint | boolean | number | string | null;
|
|
70
|
+
type ObjectRecord = (string[] | Record<string, unknown>)[];
|
|
74
71
|
/**
|
|
75
72
|
* Parse result.
|
|
76
73
|
*/
|
|
77
|
-
interface
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
interface ParseValueResult {
|
|
75
|
+
dataTypeId: RecordValueDataTypeId;
|
|
76
|
+
dataSubtypeId: NumericValueSubtypeId | StringValueSubtypeId | TemporalValueSubtypeId;
|
|
77
|
+
format: string | undefined;
|
|
78
|
+
inputValue: string;
|
|
80
79
|
parsedValue: ParsedValue;
|
|
81
|
-
|
|
80
|
+
isValid: boolean;
|
|
81
|
+
signId: NumericValueSignId;
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
type
|
|
87
|
-
type
|
|
83
|
+
/**
|
|
84
|
+
* Parsed value.
|
|
85
|
+
*/
|
|
86
|
+
type ParsedValue = bigint | boolean | number | string | null;
|
|
87
|
+
type RecordValueDataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal' | 'unknown';
|
|
88
|
+
type NumericValueSignId = 'negative' | 'zero' | 'positive' | 'unknown';
|
|
89
|
+
type NumericValueSubtypeId = 'bigint' | 'integer' | 'decimal' | 'unknown';
|
|
90
|
+
type NumericValueUnitsId = 'currency' | 'percentage' | 'plain' | 'unknown';
|
|
91
|
+
type StringValueSubtypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain' | 'unknown';
|
|
92
|
+
type TemporalValueSubtypeId = 'date' | 'dateTime' | 'time' | 'unknown';
|
|
88
93
|
export { ORDERED_VALUE_DELIMITER_IDS };
|
|
89
|
-
export type {
|
|
90
|
-
export type { DataViewContentAuditConfig, DataViewPreviewConfig };
|
|
91
|
-
export type { ParseResult };
|
|
92
|
-
export type { ObjectDataFormatId, ObjectRecordDelimiterId, RecordValueDelimiterId };
|
|
93
|
-
export type { ValueDataTypeId, ValueNumericTypeId, ValueNumericUnitsId, ValueStringTypeId, ValueTemporalTypeId };
|
|
94
|
+
export type { DataViewConfig, DataViewContentAuditConfig, DataViewInterface, DataViewLocalisedConfig, DataViewPreviewConfig, ObjectDataFormatId, ObjectRecord, ObjectRecordDelimiterId, ParseValueResult, RecordValueDelimiterId, RecordValueDataTypeId, NumericValueSignId, NumericValueSubtypeId, NumericValueUnitsId, StringValueSubtypeId, TemporalValueSubtypeId };
|
|
@@ -9,7 +9,6 @@ type ComponentConfig = InferOutput<typeof componentConfigSchema>;
|
|
|
9
9
|
type ComponentReference = InferOutput<typeof componentReferenceSchema>;
|
|
10
10
|
type ComponentStatus = InferOutput<typeof componentStatusSchema>;
|
|
11
11
|
declare function getComponentStatus(id: string, localeId?: LocaleCode): ComponentStatus;
|
|
12
|
-
/** Exports */
|
|
13
12
|
export { getComponentStatus };
|
|
14
13
|
export { componentConfigSchema } from './componentConfig.schema';
|
|
15
14
|
export type { Component, ComponentConfig, ComponentReference };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.458",
|
|
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>",
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"import": "./dist/datapos-shared-errors.es.js",
|
|
50
50
|
"types": "./dist/types/src/errors/index.d.ts"
|
|
51
51
|
},
|
|
52
|
+
"./locale": {
|
|
53
|
+
"import": "./dist/datapos-shared-locale.es.js",
|
|
54
|
+
"types": "./dist/types/src/localt/index.d.ts"
|
|
55
|
+
},
|
|
52
56
|
"./utilities": {
|
|
53
57
|
"import": "./dist/datapos-shared-utilities.es.js",
|
|
54
58
|
"types": "./dist/types/src/utilities/index.d.ts"
|
package/dist/locale-DTTQsZic.js
DELETED
|
File without changes
|