@dpuse/dpuse-shared 0.3.608 → 0.3.610

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,15 +1,17 @@
1
1
  import { InferOutput } from 'valibot';
2
2
  import { componentConfigSchema, componentReferenceSchema, componentStatusSchema } from './componentConfig.schema';
3
3
  import { LocaleCode } from '../locale';
4
- /** Component. */
5
- interface Component {
4
+ export interface Component {
6
5
  readonly config: ComponentConfig;
7
6
  }
8
- type ComponentConfig = InferOutput<typeof componentConfigSchema>;
9
- type ComponentReference = InferOutput<typeof componentReferenceSchema>;
7
+ export type ComponentConfig = InferOutput<typeof componentConfigSchema>;
8
+ export type ComponentLocalisedConfig = Omit<ComponentConfig, 'label' | 'description'> & {
9
+ label: string;
10
+ description: string;
11
+ };
12
+ export type ComponentReference = InferOutput<typeof componentReferenceSchema>;
10
13
  type ComponentStatus = InferOutput<typeof componentStatusSchema>;
11
14
  declare function getComponentStatus(id: string, localeId?: LocaleCode): ComponentStatus;
12
15
  export { getComponentStatus };
13
16
  export { componentConfigSchema } from './componentConfig.schema';
14
- export type { Component, ComponentConfig, ComponentReference };
15
17
  export type { ModuleConfig, ModuleTypeId } from './module';
@@ -1,5 +1,4 @@
1
- import { ConnectionConfig } from '../component/connector/connection';
2
- import { ContextConfig } from '../component/context';
1
+ import { ComponentLocalisedConfig } from '../component';
3
2
  import { EncodingTypeConfig } from '../encoding';
4
3
  import { ModuleConfig } from '../component/module';
5
4
  import { ObjectColumnConfig } from '../component/connector';
@@ -11,7 +10,7 @@ export interface EngineRuntime {
11
10
  }
12
11
  export interface EngineWorker {
13
12
  initialise: (options: EngineInitialiseOptions) => Promise<void>;
14
- processRequest: (id: string, config: ConnectionConfig | ContextConfig, options: EngineAuthActionOptions | EngineConnectorActionOptions | EngineContextActionOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
13
+ processRequest: (id: string, config: ComponentLocalisedConfig, options: EngineAuthActionOptions | EngineConnectorActionOptions | EngineContextActionOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
15
14
  }
16
15
  export interface EngineConfig extends ModuleConfig {
17
16
  typeId: 'engine';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-shared",
3
- "version": "0.3.608",
3
+ "version": "0.3.610",
4
4
  "description": "Common constants, types and utilities used across all DPUse projects.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",