@datapos/datapos-shared 0.3.79 → 0.3.81

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,20 +1,20 @@
1
1
  import { Timestamp } from './timestamp';
2
- import { LocaleCode, StatusColorId } from './index';
2
+ import { LocaleCode, LocalisedString, StatusColorId } from './index';
3
3
  export interface ComponentConfig {
4
- description: Record<LocaleCode, string>;
5
- firstCreatedAt?: Timestamp;
6
4
  id: string;
7
- label: Record<LocaleCode, string>;
8
- lastUpdatedAt?: Timestamp;
5
+ label: Partial<LocalisedString>;
6
+ description: Partial<LocalisedString>;
7
+ firstCreatedAt?: Timestamp;
9
8
  icon?: string;
10
9
  iconDark?: string;
10
+ lastUpdatedAt?: Timestamp;
11
11
  status?: ComponentStatus;
12
12
  statusId: ComponentStatusId;
13
13
  typeId: ComponentTypeId;
14
14
  }
15
15
  export interface ComponentRef {
16
16
  id: string;
17
- label: Record<LocaleCode, string>;
17
+ label: Partial<LocalisedString>;
18
18
  }
19
19
  export type ComponentStatus = {
20
20
  id: string;
@@ -22,5 +22,5 @@ export type ComponentStatus = {
22
22
  label: string;
23
23
  };
24
24
  export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
25
- export declare const getComponentStatus: (id: string, localeId?: string) => ComponentStatus;
25
+ export declare const getComponentStatus: (id: string, localeId?: LocaleCode) => ComponentStatus;
26
26
  export type ComponentTypeId = 'app' | 'engine' | 'connector' | 'connectorConnection' | 'context' | 'contextModelGroup' | 'contextModel' | 'contextModelDimensionGroup' | 'contextModelDimension' | 'contextModelDimensionHierarchy' | 'contextModelEntityGroup' | 'contextModelEntity' | 'contextModelEntityDataItems' | 'contextModelEntityEvent' | 'contextModelEntityPrimaryMeasure' | 'contextModelSecondaryMeasureGroup' | 'contextModelSecondaryMeasure' | 'contextModelPresentationGroup' | 'contextModelPresentation' | 'dataView' | 'dimension' | 'eventQuery' | 'presenter' | 'presenterPresentation' | 'informer' | 'informerDocument';
@@ -4,7 +4,7 @@ import { nanoid } from 'nanoid';
4
4
  import { ComponentConfig } from './component';
5
5
  import { buildFetchError, OperationalError } from './errors';
6
6
  import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
7
- import { convertMillisecondsToTimestamp } from './index';
7
+ import { convertMillisecondsToTimestamp, LocalisedString } from './index';
8
8
  import { DataViewContentAuditConfig, ValueDelimiterId } from './dataView';
9
9
  import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from './utilities';
10
10
  export interface Connector {
@@ -40,7 +40,7 @@ export type ConnectorImplementation = {
40
40
  canDescribe?: boolean;
41
41
  id?: string;
42
42
  authMethodId: 'apiKey' | 'disabled' | 'oAuth2' | 'none';
43
- label?: Record<string, string>;
43
+ label?: LocalisedString;
44
44
  maxConnectionCount?: number;
45
45
  params?: Record<string, string>[];
46
46
  };
@@ -54,20 +54,20 @@ type DataFormat = {
54
54
  id: string;
55
55
  label: string;
56
56
  };
57
- export declare const getDataFormat: (id: string, localeId?: string) => DataFormat;
58
- export declare const getDataFormats: (localeId?: string) => DataFormat[];
57
+ export declare const getDataFormat: (id: string, localeId?: import('./index').LocaleCode) => DataFormat;
58
+ export declare const getDataFormats: (localeId?: import('./index').LocaleCode) => DataFormat[];
59
59
  type RecordDelimiter = {
60
60
  id: string;
61
61
  label: string;
62
62
  };
63
- export declare const getRecordDelimiter: (id: string, localeId?: string) => RecordDelimiter;
64
- export declare const getRecordDelimiters: (localeId?: string) => RecordDelimiter[];
63
+ export declare const getRecordDelimiter: (id: string, localeId?: import('./index').LocaleCode) => RecordDelimiter;
64
+ export declare const getRecordDelimiters: (localeId?: import('./index').LocaleCode) => RecordDelimiter[];
65
65
  type ValueDelimiter = {
66
66
  id: string;
67
67
  label: string;
68
68
  };
69
- export declare const getValueDelimiter: (id: string, localeId?: string) => ValueDelimiter;
70
- export declare const getValueDelimiters: (localeId?: string) => ValueDelimiter[];
69
+ export declare const getValueDelimiter: (id: string, localeId?: import('./index').LocaleCode) => ValueDelimiter;
70
+ export declare const getValueDelimiters: (localeId?: import('./index').LocaleCode) => ValueDelimiter[];
71
71
  export type ParsedValue = bigint | boolean | number | string | null;
72
72
  export type DataFormatId = 'dtv' | 'e/e' | 'jsonArray' | 'spss' | 'xls' | 'xlsx' | 'xml';
73
73
  export type RecordDelimiterId = '\n' | '\r' | '\r\n';
@@ -1,7 +1,8 @@
1
- export declare const DEFAULT_LOCALE_CODE = "en-gb";
2
- export { DefaultTimestamp } from './timestamp';
3
1
  export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
2
+ export type LocalisedString = Record<LocaleCode, string>;
4
3
  export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
4
+ export declare const DEFAULT_LOCALE_CODE: LocaleCode;
5
+ export { DefaultTimestamp } from './timestamp';
5
6
  export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId } from './component';
6
7
  export type { AuditContentResult, AuditContentSettings } from './connector';
7
8
  export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './connector';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.79",
5
+ "version": "0.3.81",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"