@datapos/datapos-shared 0.3.319 → 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 CHANGED
@@ -1,8 +1,6 @@
1
1
  # Data Positioning Shared Library
2
2
 
3
- <span><!-- OWASP_BADGES_START -->
4
- [![OWASP](https://img.shields.io/badge/OWASP-passed-4CAF50)](https://data-positioning.github.io/datapos-shared/dependency-check-reports/dependency-check-report.html)
5
- <!-- OWASP_BADGES_END --></span>
3
+ <span><!-- OWASP_BADGES_START -->[![OWASP](https://img.shields.io/badge/OWASP-passed-4CAF50)](https://data-positioning.github.io/datapos-shared/dependency-check-reports/dependency-check-report.html)<!-- OWASP_BADGES_END --></span>
6
4
  [![npm version](https://img.shields.io/npm/v/@datapos/datapos-shared.svg)](https://www.npmjs.com/package/@datapos/datapos-shared)
7
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
8
6
 
@@ -46,7 +44,7 @@ Each module implements a set of components. All module component types extend th
46
44
  | ComponentStatus | |
47
45
  | ComponentStatusId | |
48
46
  | ComponentTypeId | |
49
- | StatusColorId | |
47
+ | ComponentStatusColorId | |
50
48
 
51
49
  #### Connector Module Components
52
50
 
@@ -121,11 +119,12 @@ The following table lists top-level production and peer dependencies. All these
121
119
  The following table lists top-level production and peer dependencies. All these dependencies (including transitive ones) have been recursively verified to use Apache-2.0, BSD-2-Clause, CC0-1.0, or MIT—commercially friendly licenses with minimal restrictions. Developers cloning this repository should independently verify dev and optional dependencies; users of the published library are covered by these checks. We do not include unlicensed dependencies. Used to support development activity and not released as part of the production release. Check if you clone. We use the `npm` packages [license-report](https://www.npmjs.com/package/license-report), [license-report-check](https://www.npmjs.com/package/license-report-check) and [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) to identify dependency licenses.
122
120
 
123
121
  <!-- DEPENDENCY_LICENSES_START -->
124
- |Name|Type|Installed|Latest|Latest Released|Deps|Document|
125
- |:-|:-|:-:|:-:|:-|-:|:-|
126
- |csv-parse|MIT|6.1.0|6.1.0|5 months ago: 2025-07-16|0|⚠️ No license file|
127
- |date-fns|MIT|4.1.0|4.1.0|4 months ago: 2025-08-03|0|[LICENSE.md](https://raw.githubusercontent.com/date-fns/date-fns/main/LICENSE.md)|
128
- |nanoid|MIT|5.1.6|5.1.6|2 months ago: 2025-09-22|0|[LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE)|
122
+
123
+ | Name | Type | Installed | Latest | Latest Released | Deps | Document |
124
+ | :-------- | :--- | :-------: | :----: | :----------------------- | ---: | :-------------------------------------------------------------------------------- |
125
+ | csv-parse | MIT | 6.1.0 | 6.1.0 | 5 months ago: 2025-07-16 | 0 | ⚠️ No license file |
126
+ | date-fns | MIT | 4.1.0 | 4.1.0 | 4 months ago: 2025-08-03 | 0 | [LICENSE.md](https://raw.githubusercontent.com/date-fns/date-fns/main/LICENSE.md) |
127
+ | nanoid | MIT | 5.1.6 | 5.1.6 | 2 months ago: 2025-09-22 | 0 | [LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE) |
129
128
 
130
129
  <!-- DEPENDENCY_LICENSES_END -->
131
130
 
package/README.pdf ADDED
Binary file
@@ -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"]>;
@@ -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<{
@@ -25,7 +25,8 @@ 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>;
@@ -107,11 +108,18 @@ export interface FindSettings extends ConnectorOperationSettings {
107
108
  export interface FindResult {
108
109
  folderPath?: string;
109
110
  }
110
- export interface GetSettings extends ConnectorOperationSettings {
111
+ export interface GetReaderSettings extends ConnectorOperationSettings {
111
112
  id: string;
112
113
  path: string;
113
114
  }
114
- export interface GetResult {
115
+ export interface GetReaderResult {
116
+ record?: string[] | Record<string, unknown>;
117
+ }
118
+ export interface GetRecordSettings extends ConnectorOperationSettings {
119
+ id: string;
120
+ path: string;
121
+ }
122
+ export interface GetRecordResult {
115
123
  record?: string[] | Record<string, unknown>;
116
124
  }
117
125
  export interface ListSettings extends ConnectorOperationSettings {
@@ -168,4 +176,5 @@ interface ConnectorCategory {
168
176
  id: string;
169
177
  label: string;
170
178
  }
179
+ /** Exposures */
171
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,22 +1,14 @@
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
7
  export type ComponentConfig = InferOutput<typeof componentConfigSchema>;
8
- export interface ComponentConfig1 {
9
- id: string;
10
- label: Partial<LocalisedString>;
11
- description: Partial<LocalisedString>;
12
- firstCreatedAt?: number;
13
- icon: string | null;
14
- iconDark: string | null;
15
- lastUpdatedAt: number | null;
16
- status: ComponentStatus | null;
17
- statusId: ComponentStatusId;
18
- typeId: ComponentTypeId;
19
- }
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>;
20
12
  export interface ComponentReference {
21
13
  id: string;
22
14
  label: Partial<LocalisedString>;
@@ -26,17 +18,11 @@ export interface ComponentReference {
26
18
  order: number;
27
19
  path: string;
28
20
  }
29
- export interface ComponentStatus {
30
- id: string;
31
- color: StatusColorId;
32
- label: string;
33
- }
34
- export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
35
21
  export declare const getComponentStatus: (id: string, localeId?: LocaleCode) => ComponentStatus;
36
- 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';
37
22
  export interface ModuleConfig extends ComponentConfig {
38
23
  typeId: ModuleTypeId;
39
24
  version: string;
40
25
  }
41
26
  export type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
27
+ /** Exposures */
42
28
  export { componentConfigSchema } from './componentConfig.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<{
@@ -5,29 +5,15 @@
5
5
  export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
6
6
  export type LocalisedString = Record<LocaleCode, string>;
7
7
  /** Interfaces/Types - Component */
8
- export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId } from './component';
9
- export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
8
+ export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId, ComponentStatusColorId } from './component';
10
9
  /** Schemas - Component */
11
10
  export { componentConfigSchema } from './component';
12
11
  /** Constants - Connector */
13
12
  export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './component/connector';
14
13
  /** Interfaces/Types Component - Connector */
15
- export type { ConnectorOperation, ConnectorUsageId } from './component/connector';
16
- export type { AuditContentResult, AuditContentSettings } from './component/connector';
17
- export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './component/connector';
18
- export type { CreateSettings } from './component/connector';
19
- export type { DropSettings } from './component/connector';
20
- export type { FindResult, FindSettings } from './component/connector';
21
- export type { GetResult, GetSettings } from './component/connector';
22
- export type { InitialiseSettings } from './component/connector';
23
- export type { ListResult, ListSettings } from './component/connector';
24
- export type { PreviewResult, PreviewSettings } from './component/connector';
25
- export type { RemoveSettings } from './component/connector';
26
- export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './component/connector';
27
- export type { UpsertSettings } from './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';
28
15
  /** Interfaces/Types - Connection */
29
- export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
30
- export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
16
+ export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
31
17
  /** Schemas - Connector */
32
18
  export { connectorConfigSchema } from './component/connector';
33
19
  /** Interfaces/Types - Context. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.319",
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>",
@@ -49,6 +49,7 @@
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",
@@ -71,7 +72,8 @@
71
72
  "release": "op run --env-file=.env -- node -e \"import('@datapos/datapos-development').then(m => m.releaseProject())\"",
72
73
  "sync": "node -e \"import('@datapos/datapos-development').then(m => m.syncProjectWithGitHub())\"",
73
74
  "test": "node -e \"import('@datapos/datapos-development').then(m => m.testProject())\"",
74
- "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"
75
77
  },
76
78
  "engines": {
77
79
  "node": ">=22.0.0",