@transai/connector-runner-ai-agent 0.14.2 → 0.16.0

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.
@@ -23,13 +23,26 @@ export interface NumberOutputParameterInterface extends OutputItemParameterInter
23
23
  export interface OutputParameterInterface {
24
24
  [key: string]: OutputItemParameterInterface | ArrayOutputParameterInterface | NumberOutputParameterInterface;
25
25
  }
26
- export interface InputParameterInterface {
26
+ interface BaseInputParameter {
27
27
  name: string;
28
28
  description?: string;
29
- type: 'string' | 'number' | 'boolean' | 'array';
30
29
  required?: boolean;
31
- items?: Array<InputParameterInterface>;
32
30
  }
31
+ export interface ValueInputParameter extends BaseInputParameter {
32
+ type: 'string' | 'number' | 'boolean';
33
+ }
34
+ export interface SimpleArrayInputParameter extends BaseInputParameter {
35
+ type: 'simple-array';
36
+ itemType: 'string' | 'number' | 'boolean';
37
+ }
38
+ export interface ArrayInputParameter extends BaseInputParameter {
39
+ type: 'array';
40
+ items: Array<InputParameterInterface>;
41
+ }
42
+ export interface UnknownInputParameter extends BaseInputParameter {
43
+ type: 'unknown';
44
+ }
45
+ export type InputParameterInterface = ValueInputParameter | SimpleArrayInputParameter | ArrayInputParameter | UnknownInputParameter;
33
46
  export interface ActionInterface {
34
47
  identifier: string;
35
48
  version: string;
@@ -47,3 +60,4 @@ export interface ActionInterface {
47
60
  mode?: ConnectorOrigin;
48
61
  createdAt: Date;
49
62
  }
63
+ export {};
@@ -23,8 +23,15 @@ export declare const ConnectorSchema: z.ZodObject<{
23
23
  number: "number";
24
24
  boolean: "boolean";
25
25
  array: "array";
26
+ "simple-array": "simple-array";
27
+ unknown: "unknown";
26
28
  }>;
27
29
  required: z.ZodOptional<z.ZodBoolean>;
30
+ itemType: z.ZodOptional<z.ZodEnum<{
31
+ string: "string";
32
+ number: "number";
33
+ boolean: "boolean";
34
+ }>>;
28
35
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
29
36
  }, z.core.$strip>>;
30
37
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -21,8 +21,15 @@ export declare const ConnectorsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
21
21
  number: "number";
22
22
  boolean: "boolean";
23
23
  array: "array";
24
+ "simple-array": "simple-array";
25
+ unknown: "unknown";
24
26
  }>;
25
27
  required: z.ZodOptional<z.ZodBoolean>;
28
+ itemType: z.ZodOptional<z.ZodEnum<{
29
+ string: "string";
30
+ number: "number";
31
+ boolean: "boolean";
32
+ }>>;
26
33
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
27
34
  }, z.core.$strip>>;
28
35
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -130,8 +130,15 @@ export declare const TemplateImplementationOverridesSchema: z.ZodObject<{
130
130
  number: "number";
131
131
  boolean: "boolean";
132
132
  array: "array";
133
+ "simple-array": "simple-array";
134
+ unknown: "unknown";
133
135
  }>;
134
136
  required: z.ZodOptional<z.ZodBoolean>;
137
+ itemType: z.ZodOptional<z.ZodEnum<{
138
+ string: "string";
139
+ number: "number";
140
+ boolean: "boolean";
141
+ }>>;
135
142
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
136
143
  }, z.core.$strip>>;
137
144
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -135,8 +135,15 @@ export declare const TemplateImplementationSchema: z.ZodObject<{
135
135
  number: "number";
136
136
  boolean: "boolean";
137
137
  array: "array";
138
+ "simple-array": "simple-array";
139
+ unknown: "unknown";
138
140
  }>;
139
141
  required: z.ZodOptional<z.ZodBoolean>;
142
+ itemType: z.ZodOptional<z.ZodEnum<{
143
+ string: "string";
144
+ number: "number";
145
+ boolean: "boolean";
146
+ }>>;
140
147
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
141
148
  }, z.core.$strip>>;
142
149
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -283,8 +290,15 @@ export declare const TemplateImplementationCreateSchema: z.ZodObject<{
283
290
  number: "number";
284
291
  boolean: "boolean";
285
292
  array: "array";
293
+ "simple-array": "simple-array";
294
+ unknown: "unknown";
286
295
  }>;
287
296
  required: z.ZodOptional<z.ZodBoolean>;
297
+ itemType: z.ZodOptional<z.ZodEnum<{
298
+ string: "string";
299
+ number: "number";
300
+ boolean: "boolean";
301
+ }>>;
288
302
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
289
303
  }, z.core.$strip>>;
290
304
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -143,8 +143,15 @@ export declare const TemplateSchema: z.ZodObject<{
143
143
  number: "number";
144
144
  boolean: "boolean";
145
145
  array: "array";
146
+ "simple-array": "simple-array";
147
+ unknown: "unknown";
146
148
  }>;
147
149
  required: z.ZodOptional<z.ZodBoolean>;
150
+ itemType: z.ZodOptional<z.ZodEnum<{
151
+ string: "string";
152
+ number: "number";
153
+ boolean: "boolean";
154
+ }>>;
148
155
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
149
156
  }, z.core.$strip>>;
150
157
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -21,13 +21,26 @@ export interface NumberOutputParameterInterface extends OutputItemParameterInter
21
21
  export interface OutputParameterInterface {
22
22
  [key: string]: OutputItemParameterInterface | ArrayOutputParameterInterface | NumberOutputParameterInterface;
23
23
  }
24
- export interface InputParameterInterface {
24
+ interface BaseInputParameter {
25
25
  name: string;
26
26
  description?: string;
27
- type: 'string' | 'number' | 'boolean' | 'array';
28
27
  required?: boolean;
29
- items?: Array<InputParameterInterface>;
30
28
  }
29
+ export interface ValueInputParameter extends BaseInputParameter {
30
+ type: 'string' | 'number' | 'boolean';
31
+ }
32
+ export interface SimpleArrayInputParameter extends BaseInputParameter {
33
+ type: 'simple-array';
34
+ itemType: 'string' | 'number' | 'boolean';
35
+ }
36
+ export interface ArrayInputParameter extends BaseInputParameter {
37
+ type: 'array';
38
+ items: Array<InputParameterInterface>;
39
+ }
40
+ export interface UnknownInputParameter extends BaseInputParameter {
41
+ type: 'unknown';
42
+ }
43
+ export type InputParameterInterface = ValueInputParameter | SimpleArrayInputParameter | ArrayInputParameter | UnknownInputParameter;
31
44
  export interface ActionInterface {
32
45
  identifier: string;
33
46
  version: string;
@@ -60,8 +73,15 @@ export declare const ActionSchema: z.ZodObject<{
60
73
  number: "number";
61
74
  boolean: "boolean";
62
75
  array: "array";
76
+ "simple-array": "simple-array";
77
+ unknown: "unknown";
63
78
  }>;
64
79
  required: z.ZodOptional<z.ZodBoolean>;
80
+ itemType: z.ZodOptional<z.ZodEnum<{
81
+ string: "string";
82
+ number: "number";
83
+ boolean: "boolean";
84
+ }>>;
65
85
  items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
66
86
  }, z.core.$strip>>;
67
87
  outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -69,3 +89,4 @@ export declare const ActionSchema: z.ZodObject<{
69
89
  createdAt: z.ZodOptional<z.ZodDate>;
70
90
  updatedAt: z.ZodOptional<z.ZodDate>;
71
91
  }, z.core.$strip>;
92
+ export {};
@@ -3,14 +3,25 @@ export interface ValueMapper {
3
3
  type: 'string' | 'number' | 'boolean';
4
4
  required?: boolean;
5
5
  }
6
+ export interface SimpleArrayMapper {
7
+ selector: string;
8
+ type: 'simple-array';
9
+ itemType: 'string' | 'number' | 'boolean';
10
+ required?: boolean;
11
+ }
6
12
  export interface ArrayMapper {
7
13
  selector: string;
8
14
  type: 'array';
9
15
  required?: boolean;
10
16
  items: MessageMapper;
11
17
  }
18
+ export interface UnknownMapper {
19
+ selector: string;
20
+ type: 'unknown';
21
+ required?: boolean;
22
+ }
12
23
  export type MessageMapper = {
13
- [key: string]: ValueMapper | ArrayMapper;
24
+ [key: string]: ValueMapper | SimpleArrayMapper | ArrayMapper | UnknownMapper;
14
25
  };
15
26
  export interface ConditionMapper {
16
27
  selector: string;
@@ -1,6 +1,6 @@
1
1
  import { NodeTypes, TriggerType } from './enums';
2
- import { ConditionMapper, MessageMapper, NodeMapper, ValidationMapper } from './parameter-mapper.interface';
3
- import { WorkflowDrawing } from './workflow-drawing.interface';
2
+ import { ConditionMapper, NodeMapper, ValidationMapper } from './parameter-mapper.interface';
3
+ import { NodeSelectors, WorkflowDrawing } from './workflow-drawing.interface';
4
4
  export interface StoredInterface {
5
5
  id: string;
6
6
  createdAt: Date;
@@ -24,7 +24,7 @@ export interface WorkflowDefinitionStepBase {
24
24
  export type BaseWorkflowDefinitionStep = WorkflowDefinitionStepBase & StoredInterface;
25
25
  export interface ActionStep extends WorkflowDefinitionStepBase {
26
26
  type: NodeTypes.ACTION;
27
- with: MessageMapper;
27
+ with: NodeSelectors;
28
28
  operationVersion: string;
29
29
  }
30
30
  export interface ConditionalStep extends WorkflowDefinitionStepBase {
@@ -1,9 +1,16 @@
1
1
  import { ChartInterface } from '../chart.interface';
2
2
  import { ConditionalTypes, NodeTypes, TriggerType } from './enums';
3
- import { ConditionMapper, MessageMapper, ValidationMapper } from './parameter-mapper.interface';
3
+ import { ConditionMapper, ValidationMapper } from './parameter-mapper.interface';
4
4
  export interface Conditional {
5
5
  type: ConditionalTypes;
6
6
  }
7
+ export interface Selectors {
8
+ selector: string;
9
+ items?: NodeSelectors;
10
+ }
11
+ export interface NodeSelectors {
12
+ [key: string]: Selectors;
13
+ }
7
14
  export interface Node {
8
15
  id: string;
9
16
  type: NodeTypes;
@@ -20,7 +27,7 @@ export interface ActionNode extends Node {
20
27
  identifier: string;
21
28
  version: string;
22
29
  };
23
- with: MessageMapper;
30
+ with: NodeSelectors;
24
31
  }
25
32
  export interface TriggerNode extends Node {
26
33
  type: NodeTypes.TRIGGER;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transai/connector-runner-ai-agent",
3
- "version": "0.14.2",
3
+ "version": "0.16.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },