@datapos/datapos-shared 0.3.252 → 0.3.255
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.es.js +2682 -128
- package/dist/types/src/_SCHEMA_TYPES.d.ts +42 -0
- package/dist/types/src/component/connector/connectorSchema.d.ts +46 -0
- package/dist/types/src/component/context/contextSchema.d.ts +45 -0
- package/dist/types/src/component/presenter/presenterSchema.d.ts +28 -0
- package/dist/types/src/index.d.ts +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type ComponentStatus = {
|
|
2
|
+
id: string;
|
|
3
|
+
color: StatusColorId;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
7
|
+
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';
|
|
8
|
+
type StatusColorId = 'amber' | 'green' | 'red' | 'other';
|
|
9
|
+
type Timestamp = number;
|
|
10
|
+
interface ComponentConfig {
|
|
11
|
+
id: string;
|
|
12
|
+
label: Record<string, string>;
|
|
13
|
+
description: Record<string, string>;
|
|
14
|
+
firstCreatedAt?: Timestamp;
|
|
15
|
+
icon?: string;
|
|
16
|
+
iconDark?: string;
|
|
17
|
+
lastUpdatedAt?: Timestamp;
|
|
18
|
+
status?: ComponentStatus;
|
|
19
|
+
statusId: ComponentStatusId;
|
|
20
|
+
typeId: ComponentTypeId;
|
|
21
|
+
}
|
|
22
|
+
type ComponentRef = {
|
|
23
|
+
id: string;
|
|
24
|
+
label: Record<string, string>;
|
|
25
|
+
description: Record<string, string>;
|
|
26
|
+
icon?: string;
|
|
27
|
+
iconDark?: string;
|
|
28
|
+
order: number;
|
|
29
|
+
path: string;
|
|
30
|
+
};
|
|
31
|
+
interface ModuleConfig extends ComponentConfig {
|
|
32
|
+
typeId: ModuleTypeId;
|
|
33
|
+
version: string;
|
|
34
|
+
}
|
|
35
|
+
type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
|
|
36
|
+
export interface PresenterConfig extends ModuleConfig {
|
|
37
|
+
presentations: ComponentRef[];
|
|
38
|
+
operations: PresenterOperation[];
|
|
39
|
+
typeId: 'presenter';
|
|
40
|
+
}
|
|
41
|
+
type PresenterOperation = 'list' | 'render' | 'setColorMode';
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const connectorImplementationSchema: z.ZodObject<{
|
|
3
|
+
activeConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
4
|
+
canDescribe: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
id: z.ZodOptional<z.ZodString>;
|
|
6
|
+
authMethodId: z.ZodUnion<readonly [z.ZodLiteral<"apiKey">, z.ZodLiteral<"disabled">, z.ZodLiteral<"oAuth2">, z.ZodLiteral<"none">]>;
|
|
7
|
+
label: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"en-au">, z.ZodLiteral<"en-gb">, z.ZodLiteral<"en-us">, z.ZodLiteral<"es-es">]>, z.ZodString>>;
|
|
8
|
+
maxConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
params: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const connectorConfigSchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
14
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
15
|
+
firstCreatedAt: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
17
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
18
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
color: z.ZodUnion<readonly [z.ZodLiteral<"amber">, z.ZodLiteral<"green">, z.ZodLiteral<"red">, z.ZodLiteral<"other">]>;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
statusId: z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"beta">, z.ZodLiteral<"generalAvailability">, z.ZodLiteral<"notApplicable">, z.ZodLiteral<"preAlpha">, z.ZodLiteral<"proposed">, z.ZodLiteral<"releaseCandidate">, z.ZodLiteral<"unavailable">, z.ZodLiteral<"underReview">]>;
|
|
25
|
+
version: z.ZodString;
|
|
26
|
+
category: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
label: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
categoryId: z.ZodUnion<readonly [z.ZodLiteral<"application">, z.ZodLiteral<"curatedDataset">, z.ZodLiteral<"database">, z.ZodLiteral<"fileStore">]>;
|
|
31
|
+
implementations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
32
|
+
activeConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
canDescribe: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
authMethodId: z.ZodUnion<readonly [z.ZodLiteral<"apiKey">, z.ZodLiteral<"disabled">, z.ZodLiteral<"oAuth2">, z.ZodLiteral<"none">]>;
|
|
36
|
+
label: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"en-au">, z.ZodLiteral<"en-gb">, z.ZodLiteral<"en-us">, z.ZodLiteral<"es-es">]>, z.ZodString>>;
|
|
37
|
+
maxConnectionCount: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
params: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
operations: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"abortOperation">, z.ZodLiteral<"authenticateConnection">, z.ZodLiteral<"createObject">, z.ZodLiteral<"describeConnection">, z.ZodLiteral<"dropObject">, z.ZodLiteral<"findObject">, z.ZodLiteral<"getRecord">, z.ZodLiteral<"listNodes">, z.ZodLiteral<"previewObject">, z.ZodLiteral<"removeRecords">, z.ZodLiteral<"retrieveRecords">, z.ZodLiteral<"upsertRecords">]>>;
|
|
41
|
+
typeId: z.ZodLiteral<"connector">;
|
|
42
|
+
usageId: z.ZodUnion<readonly [z.ZodLiteral<"bidirectional">, z.ZodLiteral<"destination">, z.ZodLiteral<"source">, z.ZodLiteral<"unknown">]>;
|
|
43
|
+
vendorAccountURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
|
+
vendorDocumentationURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
vendorHomeURL: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const contextConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6
|
+
firstCreatedAt: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
8
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
9
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
color: z.ZodUnion<readonly [z.ZodLiteral<"amber">, z.ZodLiteral<"green">, z.ZodLiteral<"red">, z.ZodLiteral<"other">]>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
statusId: z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"beta">, z.ZodLiteral<"generalAvailability">, z.ZodLiteral<"notApplicable">, z.ZodLiteral<"preAlpha">, z.ZodLiteral<"proposed">, z.ZodLiteral<"releaseCandidate">, z.ZodLiteral<"unavailable">, z.ZodLiteral<"underReview">]>;
|
|
16
|
+
version: z.ZodString;
|
|
17
|
+
models: z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
20
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
21
|
+
firstCreatedAt: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
23
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
24
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
color: z.ZodUnion<readonly [z.ZodLiteral<"amber">, z.ZodLiteral<"green">, z.ZodLiteral<"red">, z.ZodLiteral<"other">]>;
|
|
28
|
+
label: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
statusId: z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"beta">, z.ZodLiteral<"generalAvailability">, z.ZodLiteral<"notApplicable">, z.ZodLiteral<"preAlpha">, z.ZodLiteral<"proposed">, z.ZodLiteral<"releaseCandidate">, z.ZodLiteral<"unavailable">, z.ZodLiteral<"underReview">]>;
|
|
31
|
+
typeId: z.ZodUnion<readonly [z.ZodLiteral<"app">, z.ZodLiteral<"connector">, z.ZodLiteral<"connectorConnection">, z.ZodLiteral<"context">, z.ZodLiteral<"contextModelGroup">, z.ZodLiteral<"contextModel">, z.ZodLiteral<"contextModelDimensionGroup">, z.ZodLiteral<"contextModelDimension">, z.ZodLiteral<"contextModelDimensionHierarchy">, z.ZodLiteral<"contextModelEntityGroup">, z.ZodLiteral<"contextModelEntity">, z.ZodLiteral<"contextModelEntityDataItem">, z.ZodLiteral<"contextModelEntityEvent">, z.ZodLiteral<"contextModelEntityPrimaryMeasure">, z.ZodLiteral<"contextModelSecondaryMeasureGroup">, z.ZodLiteral<"contextModelSecondaryMeasure">, z.ZodLiteral<"dataView">, z.ZodLiteral<"dimension">, z.ZodLiteral<"engine">, z.ZodLiteral<"eventQuery">, z.ZodLiteral<"presenter">, z.ZodLiteral<"presenterPresentation">, z.ZodLiteral<"tool">]>;
|
|
32
|
+
modelRefs: z.ZodArray<z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
35
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
36
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
37
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
38
|
+
order: z.ZodNumber;
|
|
39
|
+
path: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
order: z.ZodNumber;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
operations: z.ZodArray<z.ZodLiteral<"list">>;
|
|
44
|
+
typeId: z.ZodLiteral<"context">;
|
|
45
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const presenterConfigSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
5
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
6
|
+
firstCreatedAt: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
8
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
9
|
+
lastUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
color: z.ZodUnion<readonly [z.ZodLiteral<"amber">, z.ZodLiteral<"green">, z.ZodLiteral<"red">, z.ZodLiteral<"other">]>;
|
|
13
|
+
label: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
statusId: z.ZodUnion<readonly [z.ZodLiteral<"alpha">, z.ZodLiteral<"beta">, z.ZodLiteral<"generalAvailability">, z.ZodLiteral<"notApplicable">, z.ZodLiteral<"preAlpha">, z.ZodLiteral<"proposed">, z.ZodLiteral<"releaseCandidate">, z.ZodLiteral<"unavailable">, z.ZodLiteral<"underReview">]>;
|
|
16
|
+
version: z.ZodString;
|
|
17
|
+
presentations: z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
label: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
20
|
+
description: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
21
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
22
|
+
iconDark: z.ZodOptional<z.ZodString>;
|
|
23
|
+
order: z.ZodNumber;
|
|
24
|
+
path: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
operations: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"list">, z.ZodLiteral<"render">, z.ZodLiteral<"setColorMode">]>>;
|
|
27
|
+
typeId: z.ZodLiteral<"presenter">;
|
|
28
|
+
}, z.core.$strip>;
|
|
@@ -19,6 +19,9 @@ export type { PreviewResult, PreviewSettings } from './component/connector';
|
|
|
19
19
|
export type { RemoveSettings } from './component/connector';
|
|
20
20
|
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './component/connector';
|
|
21
21
|
export type { UpsertSettings } from './component/connector';
|
|
22
|
+
export { connectorConfigSchema } from './component/connector/connectorSchema';
|
|
23
|
+
export { contextConfigSchema } from './component/context/contextSchema';
|
|
24
|
+
export { presenterConfigSchema } from './component/presenter/presenterSchema';
|
|
22
25
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
|
|
23
26
|
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
24
27
|
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation } from './component/context';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.255",
|
|
4
4
|
"description": "A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"npm-check-updates": "^19.1.2",
|
|
45
45
|
"prettier": "^3.6.2",
|
|
46
46
|
"retire": "^5.3.0",
|
|
47
|
+
"ts-to-zod": "^5.1.0",
|
|
47
48
|
"typescript": "^5.9.3",
|
|
48
49
|
"vite": "^7.2.4",
|
|
49
50
|
"vite-plugin-dts": "^4.5.4"
|
|
@@ -64,7 +65,8 @@
|
|
|
64
65
|
"_document:licenceReport": "license-report --only=prod,peer > LICENSES.json",
|
|
65
66
|
"_document:licenceCheck": "license-report-check --source ./LICENSES.json --allowed 'MIT' --allowed 'n/a' --allowed 'Apache-2.0' --output=table",
|
|
66
67
|
"_sync:withGitHub": "node -e \"import('@datapos/datapos-development').then(m => m.syncWithGitHub())\"",
|
|
67
|
-
"_update:developDep": "npm install --save-dev @datapos/datapos-development@latest"
|
|
68
|
+
"_update:developDep": "npm install --save-dev @datapos/datapos-development@latest",
|
|
69
|
+
"___ts-to-zod": "npx ts-to-zod src/schemaTypes.ts src/schemaZOD.ts"
|
|
68
70
|
},
|
|
69
71
|
"engines": {
|
|
70
72
|
"node": ">=22.0.0",
|