@transai/connector-runner-otto-fleet-manager-v2 0.6.1
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/CHANGELOG.md +73 -0
- package/README.md +11 -0
- package/index.cjs +2 -0
- package/index.cjs.map +7 -0
- package/index.js +2 -0
- package/index.js.map +7 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/index.d.ts +1 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/actions-handler.d.ts +8 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/base-action.d.ts +9 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/actions/create-mission.action.d.ts +11 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/connector-runner-otto-fleet-manager-v2.d.ts +8 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/extractors/missions.extractor.d.ts +10 -0
- package/libs/connector-runner-otto-fleet-manager-v2/src/lib/types.d.ts +58 -0
- package/libs/connector-runtime-sdk/src/index.d.ts +4 -0
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.d.ts +16 -0
- package/libs/connector-runtime-sdk/src/lib/connector-runtime.interface.d.ts +5 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/files.sdk.interface.d.ts +19 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/http-client.interface.d.ts +47 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/index.d.ts +10 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/logger.sdk.interface.d.ts +7 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/offset-store.sdk.interface.d.ts +12 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/processing.sdk.interface.d.ts +13 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/receiver.sdk.interface.d.ts +14 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/sdk.interface.d.ts +31 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/sender.sdk.interface.d.ts +22 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/telemetry.sdk.interface.d.ts +15 -0
- package/libs/connector-runtime-sdk/src/lib/sdk/templating.sdk.interface.d.ts +12 -0
- package/libs/connector-runtime-sdk/src/lib/support/index.d.ts +1 -0
- package/libs/connector-runtime-sdk/src/lib/support/null-logger.d.ts +8 -0
- package/libs/types/src/index.d.ts +7 -0
- package/libs/types/src/lib/cube-query-config.types.d.ts +20 -0
- package/libs/types/src/lib/file-action.types.d.ts +5 -0
- package/libs/types/src/lib/http-status-codes.enum.d.ts +64 -0
- package/libs/types/src/lib/management-api/action-definition.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/chart.interface.d.ts +9 -0
- package/libs/types/src/lib/management-api/connector/connector.interface.d.ts +52 -0
- package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +38 -0
- package/libs/types/src/lib/management-api/connector-orchestrator-config.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/cube-dataset.interface.d.ts +93 -0
- package/libs/types/src/lib/management-api/dashboard.interface.d.ts +35 -0
- package/libs/types/src/lib/management-api/dataset/collection.interface.d.ts +10 -0
- package/libs/types/src/lib/management-api/dataset/dataset-record.interface.d.ts +5 -0
- package/libs/types/src/lib/management-api/dataset/dataset.interface.d.ts +114 -0
- package/libs/types/src/lib/management-api/dataset/datasets.interface.d.ts +94 -0
- package/libs/types/src/lib/management-api/dataset/dimension.interface.d.ts +51 -0
- package/libs/types/src/lib/management-api/dataset/dimensions.interface.d.ts +32 -0
- package/libs/types/src/lib/management-api/dataset/filter-group.interface.d.ts +8 -0
- package/libs/types/src/lib/management-api/dataset/filter.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/dataset/filters.interface.d.ts +7 -0
- package/libs/types/src/lib/management-api/dataset/measure.interface.d.ts +25 -0
- package/libs/types/src/lib/management-api/dataset/measures.interface.d.ts +16 -0
- package/libs/types/src/lib/management-api/dataset/meta.interface.d.ts +9 -0
- package/libs/types/src/lib/management-api/dataset/pre-aggregate.interface.d.ts +41 -0
- package/libs/types/src/lib/management-api/dataset/pre-aggregations.interface.d.ts +26 -0
- package/libs/types/src/lib/management-api/dataset/relation.interface.d.ts +16 -0
- package/libs/types/src/lib/management-api/dataset/relations.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/dataset/segment.interface.d.ts +17 -0
- package/libs/types/src/lib/management-api/dataset/segments.interface.d.ts +15 -0
- package/libs/types/src/lib/management-api/dataset/switch.interface.d.ts +20 -0
- package/libs/types/src/lib/management-api/dataset/when-item.interface.d.ts +15 -0
- package/libs/types/src/lib/management-api/dataset/when-items.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/event-origin.interface.d.ts +24 -0
- package/libs/types/src/lib/management-api/index.d.ts +39 -0
- package/libs/types/src/lib/management-api/semantic-trigger/custom-cron-trigger-record.interface.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/index.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filter.interface.d.ts +12 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-filters.interface.d.ts +10 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger-record.interface.d.ts +6 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-trigger.interface.d.ts +35 -0
- package/libs/types/src/lib/management-api/semantic-trigger/semantic-triggers.interface.d.ts +22 -0
- package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +148 -0
- package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +309 -0
- package/libs/types/src/lib/management-api/template.interface.d.ts +177 -0
- package/libs/types/src/lib/management-api/tenant.interface.d.ts +8 -0
- package/libs/types/src/lib/management-api/type-enums.d.ts +85 -0
- package/libs/types/src/lib/management-api/web/generic-filter.dto.d.ts +37 -0
- package/libs/types/src/lib/management-api/web/index.d.ts +2 -0
- package/libs/types/src/lib/management-api/web/paginated-response.interface.d.ts +17 -0
- package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +71 -0
- package/libs/types/src/lib/management-api/workflow/index.d.ts +6 -0
- package/libs/types/src/lib/management-api/workflow/offset.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/workflow/trigger-types.interface.d.ts +14 -0
- package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +64 -0
- package/libs/types/src/lib/management-api/workflow/workflow-run.d.ts +66 -0
- package/libs/types/src/lib/management-api/workflow/workflow.drawing.d.ts +94 -0
- package/libs/types/src/lib/message.types.d.ts +59 -0
- package/libs/types/src/lib/response.types.d.ts +27 -0
- package/libs/types/src/lib/types.d.ts +134 -0
- package/package.json +16 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ConnectorOrigin } from '../type-enums';
|
|
3
|
+
export interface LegacyOutputParameterInterface {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}
|
|
6
|
+
export type SupportedOutputTypes = 'string' | 'number' | 'boolean' | 'array' | 'null';
|
|
7
|
+
export interface OutputItemParameterInterface {
|
|
8
|
+
type: SupportedOutputTypes | SupportedOutputTypes[];
|
|
9
|
+
description?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ArrayOutputParameterInterface extends OutputItemParameterInterface {
|
|
13
|
+
type: 'array';
|
|
14
|
+
items: OutputParameterInterface;
|
|
15
|
+
}
|
|
16
|
+
export interface NumberOutputParameterInterface extends OutputItemParameterInterface {
|
|
17
|
+
type: 'number' | ('number' | 'null')[];
|
|
18
|
+
minimum?: number;
|
|
19
|
+
maximum?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface OutputParameterInterface {
|
|
22
|
+
[key: string]: OutputItemParameterInterface | ArrayOutputParameterInterface | NumberOutputParameterInterface;
|
|
23
|
+
}
|
|
24
|
+
export interface InputParameterInterface {
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
type: 'string' | 'number' | 'boolean' | 'array';
|
|
28
|
+
required?: boolean;
|
|
29
|
+
items?: Array<InputParameterInterface>;
|
|
30
|
+
}
|
|
31
|
+
export interface ActionInterface {
|
|
32
|
+
identifier: string;
|
|
33
|
+
version: string;
|
|
34
|
+
tenantIdentifier: string;
|
|
35
|
+
name: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
connectorIdentifier: string;
|
|
38
|
+
config: {
|
|
39
|
+
[key: string]: {
|
|
40
|
+
[key: string]: string | object;
|
|
41
|
+
} | string | object;
|
|
42
|
+
};
|
|
43
|
+
inputParameters: Array<InputParameterInterface>;
|
|
44
|
+
outputParameters: LegacyOutputParameterInterface | OutputParameterInterface;
|
|
45
|
+
mode?: ConnectorOrigin;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
}
|
|
48
|
+
export type CreateActionInterface = Omit<ActionInterface, 'mode' | 'createdAt'>;
|
|
49
|
+
export declare const ActionSchema: z.ZodObject<{
|
|
50
|
+
identifier: z.ZodString;
|
|
51
|
+
version: z.ZodString;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
description: z.ZodOptional<z.ZodString>;
|
|
54
|
+
config: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
55
|
+
inputParameters: z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
description: z.ZodOptional<z.ZodString>;
|
|
58
|
+
type: z.ZodEnum<{
|
|
59
|
+
string: "string";
|
|
60
|
+
number: "number";
|
|
61
|
+
boolean: "boolean";
|
|
62
|
+
array: "array";
|
|
63
|
+
}>;
|
|
64
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
68
|
+
mode: z.ZodOptional<z.ZodEnum<typeof ConnectorOrigin>>;
|
|
69
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
70
|
+
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
71
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ExtendedOffsetStore {
|
|
2
|
+
timestamp: number;
|
|
3
|
+
id: number | string;
|
|
4
|
+
date?: string;
|
|
5
|
+
rawTimestamp: number | string;
|
|
6
|
+
[key: string]: string | number | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface OffsetInterface {
|
|
9
|
+
identifier: string;
|
|
10
|
+
tenantIdentifier: string;
|
|
11
|
+
offset: ExtendedOffsetStore;
|
|
12
|
+
connectorIdentifier: string;
|
|
13
|
+
userOverwrite: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum TriggerType {
|
|
2
|
+
DASHBOARD_VISUALIZATION = "dashboard_visualization",
|
|
3
|
+
FORM = "form",
|
|
4
|
+
SEMANTIC_TRIGGER = "semantic_trigger",
|
|
5
|
+
CUSTOM_CRON = "custom_cron",
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use SEMANTIC_TRIGGER instead
|
|
8
|
+
*/
|
|
9
|
+
SEMANTIC = "SEMANTIC",
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use DASHBOARD_VISUALIZATION instead
|
|
12
|
+
*/
|
|
13
|
+
DASHBOARD = "DASHBOARD"
|
|
14
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TriggerType } from './trigger-types.interface';
|
|
2
|
+
import { NodeTypes, WorkflowDrawing } from './workflow.drawing';
|
|
3
|
+
export interface ValueMapper {
|
|
4
|
+
selector: string;
|
|
5
|
+
type: 'string' | 'number' | 'boolean';
|
|
6
|
+
required?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ArrayMapper {
|
|
9
|
+
selector: string;
|
|
10
|
+
type: 'array';
|
|
11
|
+
required?: boolean;
|
|
12
|
+
items: MessageMapper;
|
|
13
|
+
}
|
|
14
|
+
export type MessageMapper = {
|
|
15
|
+
[key: string]: ValueMapper | ArrayMapper;
|
|
16
|
+
};
|
|
17
|
+
export interface ConditionMapper {
|
|
18
|
+
selector: string;
|
|
19
|
+
[key: string]: string | {
|
|
20
|
+
id: string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type NodeMapper = MessageMapper | ConditionMapper;
|
|
25
|
+
export interface TriggerInterface {
|
|
26
|
+
name: string;
|
|
27
|
+
type: TriggerType;
|
|
28
|
+
identifier: string;
|
|
29
|
+
expression?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CreateWorkflowDefinitionStep {
|
|
32
|
+
name: string;
|
|
33
|
+
identifier: string;
|
|
34
|
+
requires: Array<string>;
|
|
35
|
+
type: NodeTypes;
|
|
36
|
+
operationIdentifier: string;
|
|
37
|
+
operationVersion?: string;
|
|
38
|
+
with: NodeMapper;
|
|
39
|
+
}
|
|
40
|
+
export interface WorkflowDefinitionStep extends CreateWorkflowDefinitionStep {
|
|
41
|
+
id: string;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
}
|
|
45
|
+
export interface CreateWorkflowDefinition {
|
|
46
|
+
identifier: string;
|
|
47
|
+
name: string;
|
|
48
|
+
ttl: number;
|
|
49
|
+
triggerName: string;
|
|
50
|
+
triggerType: TriggerType;
|
|
51
|
+
triggerIdentifier: string;
|
|
52
|
+
semanticIdentifier: string;
|
|
53
|
+
steps: Array<CreateWorkflowDefinitionStep>;
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
workflowDrawing?: WorkflowDrawing;
|
|
56
|
+
trigger?: TriggerInterface;
|
|
57
|
+
}
|
|
58
|
+
export interface WorkflowDefinition extends CreateWorkflowDefinition {
|
|
59
|
+
steps: Array<WorkflowDefinitionStep>;
|
|
60
|
+
id: string;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
tenantIdentifier: string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { EventInterface } from '../event-origin.interface';
|
|
2
|
+
import { ConditionMapper, MessageMapper, NodeMapper, WorkflowDefinition, WorkflowDefinitionStep } from './workflow-definition.interface';
|
|
3
|
+
import { NodeTypes, WorkflowDrawing } from './workflow.drawing';
|
|
4
|
+
export declare enum WorkflowRunStatusStatus {
|
|
5
|
+
PENDING = "PENDING",
|
|
6
|
+
RUNNING = "RUNNING",
|
|
7
|
+
SUCCESS = "SUCCESS",
|
|
8
|
+
FAILED = "FAILED"
|
|
9
|
+
}
|
|
10
|
+
export declare enum WorkflowJobStatusStatus {
|
|
11
|
+
PENDING = "PENDING",
|
|
12
|
+
RUNNING = "RUNNING",
|
|
13
|
+
SUCCESS = "SUCCESS",
|
|
14
|
+
SKIPPED = "SKIPPED",
|
|
15
|
+
BAD_REQUEST = "BAD_REQUEST",// input validation errors
|
|
16
|
+
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
17
|
+
ABORTED = "ABORTED"
|
|
18
|
+
}
|
|
19
|
+
export interface WorkflowRunInterface {
|
|
20
|
+
id: string;
|
|
21
|
+
tenantIdentifier: string;
|
|
22
|
+
semanticIdentifier: string;
|
|
23
|
+
status: WorkflowRunStatusStatus;
|
|
24
|
+
ttl: number;
|
|
25
|
+
workflow: WorkflowDefinition;
|
|
26
|
+
drawing?: WorkflowDrawing;
|
|
27
|
+
trigger: EventInterface;
|
|
28
|
+
jobs: Array<ActionJob | ConditionalJob | ValidationJob>;
|
|
29
|
+
createdAt: Date;
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
testRun?: boolean;
|
|
32
|
+
restartOf?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface WorkflowJobInterface {
|
|
35
|
+
id: string;
|
|
36
|
+
identifier: string;
|
|
37
|
+
run: WorkflowRunInterface;
|
|
38
|
+
status: WorkflowJobStatusStatus;
|
|
39
|
+
operationIdentifier: string;
|
|
40
|
+
operationVersion?: string;
|
|
41
|
+
payload?: Record<string, unknown> | undefined;
|
|
42
|
+
log?: string;
|
|
43
|
+
result?: unknown;
|
|
44
|
+
type: NodeTypes;
|
|
45
|
+
with: NodeMapper;
|
|
46
|
+
requires: Array<string>;
|
|
47
|
+
step: WorkflowDefinitionStep;
|
|
48
|
+
testRun?: boolean;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
}
|
|
52
|
+
export interface ActionJob extends WorkflowJobInterface {
|
|
53
|
+
type: NodeTypes.ACTION;
|
|
54
|
+
with: MessageMapper;
|
|
55
|
+
}
|
|
56
|
+
export interface ConditionalJob extends WorkflowJobInterface {
|
|
57
|
+
type: NodeTypes.CONDITIONAL;
|
|
58
|
+
with: ConditionMapper;
|
|
59
|
+
}
|
|
60
|
+
export interface ValidationJob extends WorkflowJobInterface {
|
|
61
|
+
type: NodeTypes.VALIDATION;
|
|
62
|
+
with: ConditionMapper;
|
|
63
|
+
}
|
|
64
|
+
export interface PlaceholderJob extends WorkflowJobInterface {
|
|
65
|
+
type: NodeTypes.PLACEHOLDER;
|
|
66
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { TriggerType } from './trigger-types.interface';
|
|
2
|
+
import { ConditionMapper, MessageMapper } from './workflow-definition.interface';
|
|
3
|
+
export declare enum NodeTypes {
|
|
4
|
+
TRIGGER = "TRIGGER",
|
|
5
|
+
ACTION = "ACTION",
|
|
6
|
+
CONDITIONAL = "CONDITIONAL",
|
|
7
|
+
VALIDATION = "VALIDATION",
|
|
8
|
+
ANNOTATION = "ANNOTATION",
|
|
9
|
+
PLACEHOLDER = "PLACEHOLDER",
|
|
10
|
+
INVISIBLE = "INVISIBLE",
|
|
11
|
+
END = "END"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ConditionalTypes {
|
|
14
|
+
TRUE_FALSE = "TRUE_FALSE",
|
|
15
|
+
CASE = "CASE"
|
|
16
|
+
}
|
|
17
|
+
export interface Conditional {
|
|
18
|
+
type: ConditionalTypes;
|
|
19
|
+
}
|
|
20
|
+
export interface Node {
|
|
21
|
+
id: string;
|
|
22
|
+
type: NodeTypes;
|
|
23
|
+
position: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
};
|
|
27
|
+
meta?: Record<string, string | Array<string>>;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ActionNode extends Node {
|
|
31
|
+
type: NodeTypes.ACTION;
|
|
32
|
+
action: {
|
|
33
|
+
identifier: string;
|
|
34
|
+
version: string;
|
|
35
|
+
};
|
|
36
|
+
with: MessageMapper;
|
|
37
|
+
}
|
|
38
|
+
export interface TriggerNode extends Node {
|
|
39
|
+
type: NodeTypes.TRIGGER;
|
|
40
|
+
trigger: {
|
|
41
|
+
name: string;
|
|
42
|
+
type: TriggerType;
|
|
43
|
+
identifier: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface ConditionalNode extends Node {
|
|
47
|
+
type: NodeTypes.CONDITIONAL;
|
|
48
|
+
condition: Conditional;
|
|
49
|
+
with: ConditionMapper;
|
|
50
|
+
}
|
|
51
|
+
export interface ValidationNode extends Node {
|
|
52
|
+
type: NodeTypes.VALIDATION;
|
|
53
|
+
with: ConditionMapper;
|
|
54
|
+
}
|
|
55
|
+
export interface AnnotationNode extends Node {
|
|
56
|
+
type: NodeTypes.ANNOTATION;
|
|
57
|
+
}
|
|
58
|
+
export interface EndNode extends Node {
|
|
59
|
+
type: NodeTypes.END;
|
|
60
|
+
}
|
|
61
|
+
export interface PlaceholderNode extends Node {
|
|
62
|
+
type: NodeTypes.PLACEHOLDER;
|
|
63
|
+
}
|
|
64
|
+
export interface InvisibleNode extends Node {
|
|
65
|
+
type: NodeTypes.INVISIBLE;
|
|
66
|
+
}
|
|
67
|
+
export type WorkflowNode = ActionNode | ConditionalNode | AnnotationNode | PlaceholderNode | ValidationNode | EndNode | InvisibleNode;
|
|
68
|
+
export interface Edge {
|
|
69
|
+
id: string;
|
|
70
|
+
source: {
|
|
71
|
+
nodeId: string;
|
|
72
|
+
};
|
|
73
|
+
target: {
|
|
74
|
+
nodeId: string;
|
|
75
|
+
};
|
|
76
|
+
type: string;
|
|
77
|
+
meta?: Record<string, string | Array<string>>;
|
|
78
|
+
}
|
|
79
|
+
export interface CreateWorkflowDrawingInterface {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
identifier: string;
|
|
83
|
+
ttl: number;
|
|
84
|
+
trigger: TriggerNode;
|
|
85
|
+
nodes: Array<WorkflowNode>;
|
|
86
|
+
edges: Array<Edge>;
|
|
87
|
+
enabled: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface WorkflowDrawing extends CreateWorkflowDrawingInterface {
|
|
90
|
+
id: string;
|
|
91
|
+
createdAt: Date;
|
|
92
|
+
updatedAt: Date;
|
|
93
|
+
version: number;
|
|
94
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface XodBaseMessageType {
|
|
2
|
+
type: 'ACTION' | 'EVENT' | 'SOURCE' | 'JOB';
|
|
3
|
+
eventId: string;
|
|
4
|
+
eventType: string;
|
|
5
|
+
eventTopic?: string;
|
|
6
|
+
created: number;
|
|
7
|
+
payload: object;
|
|
8
|
+
ttl: number;
|
|
9
|
+
tenantIdentifier: string;
|
|
10
|
+
testRun?: boolean;
|
|
11
|
+
meta?: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface EventPayload {
|
|
16
|
+
tenantId: string;
|
|
17
|
+
data?: {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface XodEventType extends XodBaseMessageType {
|
|
22
|
+
type: 'EVENT';
|
|
23
|
+
payload: EventPayload;
|
|
24
|
+
}
|
|
25
|
+
export interface XodActionPayloadType {
|
|
26
|
+
content?: string;
|
|
27
|
+
destination?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface XodActionType extends XodBaseMessageType {
|
|
30
|
+
type: 'ACTION';
|
|
31
|
+
payload: XodActionPayloadType;
|
|
32
|
+
}
|
|
33
|
+
export interface XodJobType extends XodBaseMessageType {
|
|
34
|
+
type: 'JOB';
|
|
35
|
+
actionIdentifier: string;
|
|
36
|
+
actionVersion: string;
|
|
37
|
+
payload: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
export interface XodSourcePayloadType {
|
|
40
|
+
keyField?: string;
|
|
41
|
+
incrementalField?: string;
|
|
42
|
+
collection?: string;
|
|
43
|
+
indexes?: Array<string>;
|
|
44
|
+
body: {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
metadata?: {
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
};
|
|
50
|
+
priority?: boolean;
|
|
51
|
+
endOfBatch?: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface XodSourceMessageType extends XodBaseMessageType {
|
|
54
|
+
type: 'SOURCE';
|
|
55
|
+
payload: XodSourcePayloadType;
|
|
56
|
+
}
|
|
57
|
+
export declare function isXodBaseMessageType(obj: XodBaseMessageType): obj is XodBaseMessageType;
|
|
58
|
+
export declare function isXodEventType(obj: XodEventType): obj is XodEventType;
|
|
59
|
+
export declare function isXodActionType(obj: XodActionType): obj is XodActionType;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { XodActionType, XodBaseMessageType, XodEventType, XodJobType } from './message.types';
|
|
2
|
+
export interface KafkaCallbackResponse<T = unknown> {
|
|
3
|
+
success: boolean;
|
|
4
|
+
statusCode: number;
|
|
5
|
+
message: string;
|
|
6
|
+
payload?: T;
|
|
7
|
+
}
|
|
8
|
+
export type KafkaCallbackResponseType<T = string> = (additionalMessage?: T) => (message: XodBaseMessageType) => Promise<KafkaCallbackResponse>;
|
|
9
|
+
export interface XodResponseType {
|
|
10
|
+
type: 'ACTION' | 'EVENT' | 'JOB';
|
|
11
|
+
message: XodActionType | XodEventType | XodJobType;
|
|
12
|
+
result: KafkaCallbackResponse;
|
|
13
|
+
responseSource: string;
|
|
14
|
+
}
|
|
15
|
+
export interface XodEventResponseType extends XodResponseType {
|
|
16
|
+
type: 'EVENT';
|
|
17
|
+
message: XodEventType;
|
|
18
|
+
}
|
|
19
|
+
export interface XodActionResponseType extends XodResponseType {
|
|
20
|
+
type: 'ACTION';
|
|
21
|
+
message: XodActionType;
|
|
22
|
+
}
|
|
23
|
+
export interface XodJobResponseType extends XodResponseType {
|
|
24
|
+
type: 'JOB';
|
|
25
|
+
message: XodJobType;
|
|
26
|
+
}
|
|
27
|
+
export declare function isXodResponseType(obj: any): obj is XodResponseType;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export interface MessageMonitorConfig {
|
|
2
|
+
type: 'in-memory' | 'redis' | 'disabled';
|
|
3
|
+
}
|
|
4
|
+
export declare enum ConfiguredConnectorTypes {
|
|
5
|
+
API = "api",
|
|
6
|
+
API_SINK = "api-sink",
|
|
7
|
+
API_SOURCE = "api-source",
|
|
8
|
+
DUMMY_NODE = "dummy-node",
|
|
9
|
+
FILE_COPY = "file-copy",
|
|
10
|
+
FILE = "file",
|
|
11
|
+
FILE_SINK = "file-sink",
|
|
12
|
+
FILE_SOURCE = "file-source",
|
|
13
|
+
SAMBA_SINK = "samba-sink",
|
|
14
|
+
SAMBA_SOURCE = "samba-source",
|
|
15
|
+
SQL_SINK = "sql-sink",
|
|
16
|
+
SQL_SOURCE = "sql-source",
|
|
17
|
+
MQTT = "mqtt",
|
|
18
|
+
CUBE_QUERY_RUNNER = "cube-query-runner",
|
|
19
|
+
FACTORY_NEBULA_SOURCE = "factory-nebula-source",
|
|
20
|
+
BYSTRONIC = "bystronic",
|
|
21
|
+
IMAP_SOURCE = "imap-source",
|
|
22
|
+
IMAP_SINK = "imap-sink",
|
|
23
|
+
OPCUA_SOURCE = "opcua-source",
|
|
24
|
+
OPCUA_SINK = "opcua-sink",
|
|
25
|
+
AI_AGENT = "ai-agent",
|
|
26
|
+
MICROSOFT_OFFICE365_EMAIL = "microsoft-office365-email",
|
|
27
|
+
MKG = "mkg",
|
|
28
|
+
EZ_MES = "ez-mes",
|
|
29
|
+
OTTO_FLEET_MANAGER_V2 = "otto-fleet-manager-v2",
|
|
30
|
+
FRAUNHOFER_BATTERY_ASSEMBLY_CELLS = "fraunhofer-battery-assembly-cells",
|
|
31
|
+
PDF_GENERATE = "pdf-generate",
|
|
32
|
+
ONSHAPE = "onshape"
|
|
33
|
+
}
|
|
34
|
+
export interface ConnectorConfig {
|
|
35
|
+
type: ConfiguredConnectorTypes;
|
|
36
|
+
identifier: string;
|
|
37
|
+
}
|
|
38
|
+
export interface RedisMessageMonitorConfig extends MessageMonitorConfig {
|
|
39
|
+
type: 'redis';
|
|
40
|
+
url: string;
|
|
41
|
+
ttl?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface InMemoryMessageMonitorConfig extends MessageMonitorConfig {
|
|
44
|
+
type: 'in-memory';
|
|
45
|
+
messagesToKeep: number;
|
|
46
|
+
}
|
|
47
|
+
export interface DisabledMessageMonitorConfig extends MessageMonitorConfig {
|
|
48
|
+
type: 'disabled';
|
|
49
|
+
}
|
|
50
|
+
export interface TopicRegex {
|
|
51
|
+
pattern: string;
|
|
52
|
+
flags: string;
|
|
53
|
+
}
|
|
54
|
+
export interface FileRegex {
|
|
55
|
+
pattern: string;
|
|
56
|
+
flags: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function isTopicRegex(obj: TopicRegex | string): obj is TopicRegex;
|
|
59
|
+
export interface CubeConfigHeaders {
|
|
60
|
+
Authorization: string;
|
|
61
|
+
}
|
|
62
|
+
export interface CubeConfig {
|
|
63
|
+
auth0_client_secret?: string;
|
|
64
|
+
auth0_client_id?: string;
|
|
65
|
+
auth0_audience?: string;
|
|
66
|
+
auth0_token_url?: string;
|
|
67
|
+
authorization?: string;
|
|
68
|
+
apiUrl: string;
|
|
69
|
+
headers?: CubeConfigHeaders;
|
|
70
|
+
redis_url?: string;
|
|
71
|
+
}
|
|
72
|
+
export declare function isCubeConfigType(obj: CubeConfig): obj is CubeConfig;
|
|
73
|
+
export interface AwsKafkaSaslConfig {
|
|
74
|
+
region?: string;
|
|
75
|
+
accessKeyId?: string;
|
|
76
|
+
secretAccessKey?: string;
|
|
77
|
+
mechanism: 'aws';
|
|
78
|
+
}
|
|
79
|
+
export declare function isAwsKafkaSalsConfig(obj: AwsKafkaSaslConfig): obj is AwsKafkaSaslConfig;
|
|
80
|
+
export interface DatabaseConfig {
|
|
81
|
+
uri: string;
|
|
82
|
+
ssl?: boolean;
|
|
83
|
+
tenantPassword?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ActionConfig {
|
|
86
|
+
timeSensitive: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface KafkaBrokerConfig {
|
|
89
|
+
groupId: string;
|
|
90
|
+
clientId: string;
|
|
91
|
+
brokers: Array<string>;
|
|
92
|
+
consumerTopics?: Array<string | TopicRegex>;
|
|
93
|
+
sasl?: AwsKafkaSaslConfig;
|
|
94
|
+
intervalCheckForNewTopics?: number;
|
|
95
|
+
disableLogs?: boolean;
|
|
96
|
+
autoCommitThreshold?: number;
|
|
97
|
+
autoCommitInterval?: number;
|
|
98
|
+
partitionsConsumedConcurrently?: number;
|
|
99
|
+
messageMonitor?: RedisMessageMonitorConfig | InMemoryMessageMonitorConfig | DisabledMessageMonitorConfig;
|
|
100
|
+
useConfluentLibrary?: boolean;
|
|
101
|
+
newConsumerProtocol?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export declare function isKafkaBrokerConfigType(obj: KafkaBrokerConfig): obj is KafkaBrokerConfig;
|
|
104
|
+
export declare function isActionConfigType(obj: any): obj is ActionConfig;
|
|
105
|
+
export declare function isDatabaseConfigType(obj: DatabaseConfig): obj is DatabaseConfig;
|
|
106
|
+
export interface BaseConnectorConfig {
|
|
107
|
+
processIdentifier: string;
|
|
108
|
+
tenantIdentifier: string;
|
|
109
|
+
datasourceIdentifier: string;
|
|
110
|
+
kafka: KafkaBrokerConfig;
|
|
111
|
+
action?: ActionConfig;
|
|
112
|
+
}
|
|
113
|
+
export declare function isBaseConnectorConfigType(obj: BaseConnectorConfig): obj is BaseConnectorConfig;
|
|
114
|
+
export declare const OPENAI_MODELS: readonly ["gpt-3.5-turbo", "gpt-4", "gpt-4-turbo", "gpt-4o", "gpt-4o-mini", "gpt-5-nano", "gpt-5-mini", "gpt-5", "o1-preview", "o1-mini"];
|
|
115
|
+
export declare const ANTHROPIC_MODELS: readonly ["claude-2", "claude-2-100k", "claude-instant-100k", "claude-sonnet-4-5"];
|
|
116
|
+
export declare const MISTRAL_MODELS: readonly ["mistral-large-2512", "mistral-medium-2508", "mistral-small-2506"];
|
|
117
|
+
export type OpenAiModel = (typeof OPENAI_MODELS)[number];
|
|
118
|
+
export type AnthropicModel = (typeof ANTHROPIC_MODELS)[number];
|
|
119
|
+
export type MistralModel = (typeof MISTRAL_MODELS)[number];
|
|
120
|
+
export interface AiAgentModel {
|
|
121
|
+
apiKey: string;
|
|
122
|
+
provider: 'openai' | 'anthropic' | 'aws' | 'mistral';
|
|
123
|
+
model: OpenAiModel | AnthropicModel | MistralModel;
|
|
124
|
+
region?: string;
|
|
125
|
+
credentials?: {
|
|
126
|
+
secretAccessKey: string;
|
|
127
|
+
accessKeyId: string;
|
|
128
|
+
};
|
|
129
|
+
temperature?: number;
|
|
130
|
+
timeout?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface AiAgentConfig extends BaseConnectorConfig {
|
|
133
|
+
model: AiAgentModel;
|
|
134
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@transai/connector-runner-otto-fleet-manager-v2",
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"license": "LGPL-3.0-or-later",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "transAI",
|
|
10
|
+
"email": "samen@transai.com",
|
|
11
|
+
"url": "https://transai.com"
|
|
12
|
+
},
|
|
13
|
+
"type": "commonjs",
|
|
14
|
+
"main": "./index.cjs",
|
|
15
|
+
"typings": "./index.d.ts"
|
|
16
|
+
}
|