@datapos/datapos-shared 0.3.251 → 0.3.254

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.
@@ -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>;
@@ -15,10 +15,10 @@ export type ContextCallbackData = {
15
15
  };
16
16
  export interface ContextConfig extends ModuleConfig {
17
17
  models: ContextModelGroupConfig[];
18
- operations: ContextOperations[];
18
+ operations: ContextOperation[];
19
19
  typeId: 'context';
20
20
  }
21
- export type ContextOperations = 'list';
21
+ export type ContextOperation = 'list';
22
22
  export type ContextLocalisedConfig = Omit<ContextConfig, 'label' | 'description'> & {
23
23
  label: string;
24
24
  description: string;
@@ -0,0 +1,56 @@
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 LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
9
+ type LocalisedString = Record<LocaleCode, string>;
10
+ type StatusColorId = 'amber' | 'green' | 'red' | 'other';
11
+ type Timestamp = number;
12
+ interface ComponentConfig {
13
+ id: string;
14
+ label: Partial<LocalisedString>;
15
+ description: Partial<LocalisedString>;
16
+ firstCreatedAt?: Timestamp;
17
+ icon?: string;
18
+ iconDark?: string;
19
+ lastUpdatedAt?: Timestamp;
20
+ status?: ComponentStatus;
21
+ statusId: ComponentStatusId;
22
+ typeId: ComponentTypeId;
23
+ }
24
+ interface ModuleConfig extends ComponentConfig {
25
+ typeId: ModuleTypeId;
26
+ version: string;
27
+ }
28
+ type ModuleTypeId = 'app' | 'engine' | 'connector' | 'context' | 'presenter' | 'tool';
29
+ type ConnectorCategory = {
30
+ id: string;
31
+ label: string;
32
+ };
33
+ export type ConnectorImplementation = {
34
+ activeConnectionCount?: number;
35
+ canDescribe?: boolean;
36
+ id?: string;
37
+ authMethodId: 'apiKey' | 'disabled' | 'oAuth2' | 'none';
38
+ label?: LocalisedString;
39
+ maxConnectionCount?: number;
40
+ params?: Record<string, string>[];
41
+ };
42
+ type ConnectorModuleCategoryId = 'application' | 'curatedDataset' | 'database' | 'fileStore';
43
+ type ConnectorOperation = 'abortOperation' | 'authenticateConnection' | 'createObject' | 'describeConnection' | 'dropObject' | 'findObject' | 'getRecord' | 'listNodes' | 'previewObject' | 'removeRecords' | 'retrieveRecords' | 'upsertRecords';
44
+ type ConnectorUsageId = 'bidirectional' | 'destination' | 'source' | 'unknown';
45
+ export interface ConnectorConfig extends ModuleConfig {
46
+ category?: ConnectorCategory;
47
+ categoryId: ConnectorModuleCategoryId;
48
+ implementations: Record<string, ConnectorImplementation>;
49
+ operations: ConnectorOperation[];
50
+ typeId: 'connector';
51
+ usageId: ConnectorUsageId;
52
+ vendorAccountURL?: string;
53
+ vendorDocumentationURL?: string;
54
+ vendorHomeURL?: string;
55
+ }
56
+ export {};
@@ -19,9 +19,10 @@ 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';
22
23
  export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
23
24
  export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
24
- export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperations } from './component/context';
25
+ export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation } from './component/context';
25
26
  export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
26
27
  export type { ContextModelDimensionGroupConfig, ContextModelDimensionGroupLocalisedConfig, ContextModelDimensionConfig, ContextModelDimensionLocalisedConfig, ContextModelDimensionHierarchyConfig, ContextModelDimensionHierarchyLocalisedConfig } from './component/context';
27
28
  export type { ContextModelEntityGroupConfig, ContextModelEntityGroupLocalisedConfig, ContextModelEntityConfig, ContextModelEntityLocalisedConfig, ContextModelEntityDataItemConfig, // Data items.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.251",
3
+ "version": "0.3.254",
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,