@transai/connector-runner-dummy-node 0.3.1 → 0.4.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.
- package/CHANGELOG.md +12 -0
- package/index.cjs +1 -1
- package/libs/connector-runtime-sdk/src/index.d.ts +1 -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/lib/management-api/connector/connector.interface.d.ts +1 -1
- package/libs/types/src/lib/management-api/connector/connectors.interface.d.ts +1 -1
- package/libs/types/src/lib/management-api/template-implementation-overrides.interface.d.ts +1 -1
- package/libs/types/src/lib/management-api/template-implementation.interface.d.ts +2 -2
- package/libs/types/src/lib/management-api/template.interface.d.ts +1 -1
- package/libs/types/src/lib/management-api/workflow/action.interface.d.ts +23 -2
- package/libs/types/src/lib/management-api/workflow/workflow-definition.interface.d.ts +13 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.3.2 (2025-12-17)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @transai/connector-runtime-sdk to 0.4.2
|
|
6
|
+
|
|
7
|
+
## 0.3.1 (2025-12-11)
|
|
8
|
+
|
|
9
|
+
### 🧱 Updated Dependencies
|
|
10
|
+
|
|
11
|
+
- Updated @transai/connector-runtime-sdk to 0.4.1
|
|
12
|
+
|
|
1
13
|
## 0.2.1 (2025-12-02)
|
|
2
14
|
|
|
3
15
|
### 🧱 Updated Dependencies
|
package/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var d=Object.create;var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var
|
|
1
|
+
"use strict";var d=Object.create;var c=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var v=(t,o)=>{for(var e in o)c(t,e,{get:o[e],enumerable:!0})},l=(t,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of C(o))!u.call(t,n)&&n!==e&&c(t,n,{get:()=>o[n],enumerable:!(r=g(o,n))||r.enumerable});return t};var I=(t,o,e)=>(e=t!=null?d(b(t)):{},l(o||!t||!t.__esModule?c(e,"default",{value:t,enumerable:!0}):e,t)),h=t=>l(c({},"__esModule",{value:!0}),t);var x={};v(x,{ConnectorRunnerDummyNode:()=>f});module.exports=h(x);var s=I(require("node:process")),a=class{constructor(o,e){this.#o="connector-runtime";this.init=()=>Promise.resolve();this.start=()=>Promise.resolve();this.stop=()=>Promise.resolve();this.#e=e,s.on?s.on("message",r=>{r.cmd===this.#o&&e.logger.verbose(`${s.pid} Received message from parent process:`,r)}):e.logger.warn("IPC channel is not available. process.on is undefined."),s.send||e.logger.warn("IPC channel is not available. process.send is undefined."),o.actions?.forEach(r=>{if(r.config.templates===void 0)return;let n={};Object.entries(r.config.templates).forEach(([i,p])=>{try{n[i]=e.templating.compile(p)}catch(m){e.logger.error(`Error compiling template ${i} for action ${r.identifier}`,m)}}),r.config.parsedTemplates=n})}#o;#e;set callbackFunction(o){this.connectorSDK.receiver.registerCallback(this.#r(o))}get connectorSDK(){return this.#e}#r(o){return async e=>{let r=await this.#e.receiver.getActionConfig(e);return r?o(e,r):this.#e.receiver.responses.badRequest("Action not found")(e)}}};var f=class extends a{constructor(){super(...arguments);this.CONNECTOR_INSTANCE="XOD_CONNECTOR_DUMMY_NODE_CONFIG";this.init=async()=>{let{config:e}=this.connectorSDK,r=e.failProbability||0;r>0&&this.connectorSDK.logger.debug("Fail probability set to",r);let n=()=>Math.random()<r;this.callbackFunction=async(i,p)=>(this.connectorSDK.logger.info("Received message: ",i.testRun?"(test run)":"",i.eventId,i.payload),n()?(this.connectorSDK.logger.error("Dummy process failed"),this.connectorSDK.receiver.responses.internalServerError("Dummy process failed")(i)):this.connectorSDK.receiver.responses.ok()(i))}}};0&&(module.exports={ConnectorRunnerDummyNode});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './null-logger';
|
|
@@ -27,7 +27,7 @@ export declare const ConnectorSchema: z.ZodObject<{
|
|
|
27
27
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
28
28
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
29
29
|
}, z.core.$strip>>;
|
|
30
|
-
outputParameters: z.ZodAny
|
|
30
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
31
31
|
mode: z.ZodOptional<z.ZodEnum<typeof ConnectorOrigin>>;
|
|
32
32
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
33
33
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -25,7 +25,7 @@ export declare const ConnectorsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.Zo
|
|
|
25
25
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
26
26
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
|
-
outputParameters: z.ZodAny
|
|
28
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
29
29
|
mode: z.ZodOptional<z.ZodEnum<typeof import("../type-enums").ConnectorOrigin>>;
|
|
30
30
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
31
31
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -132,7 +132,7 @@ export declare const TemplateImplementationOverridesSchema: z.ZodObject<{
|
|
|
132
132
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
134
134
|
}, z.core.$strip>>;
|
|
135
|
-
outputParameters: z.ZodAny
|
|
135
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
136
136
|
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
137
137
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
138
138
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -137,7 +137,7 @@ export declare const TemplateImplementationSchema: z.ZodObject<{
|
|
|
137
137
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
138
138
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
139
139
|
}, z.core.$strip>>;
|
|
140
|
-
outputParameters: z.ZodAny
|
|
140
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
141
141
|
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
142
142
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
143
143
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -283,7 +283,7 @@ export declare const TemplateImplementationCreateSchema: z.ZodObject<{
|
|
|
283
283
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
284
284
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
285
285
|
}, z.core.$strip>>;
|
|
286
|
-
outputParameters: z.ZodAny
|
|
286
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
287
287
|
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
288
288
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
289
289
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -137,7 +137,7 @@ export declare const TemplateSchema: z.ZodObject<{
|
|
|
137
137
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
138
138
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
139
139
|
}, z.core.$strip>>;
|
|
140
|
-
outputParameters: z.ZodAny
|
|
140
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
141
141
|
mode: z.ZodOptional<z.ZodEnum<typeof import("./type-enums").ConnectorOrigin>>;
|
|
142
142
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
143
143
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
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
|
+
}
|
|
3
24
|
export interface InputParameterInterface {
|
|
4
25
|
name: string;
|
|
5
26
|
description?: string;
|
|
@@ -20,7 +41,7 @@ export interface ActionInterface {
|
|
|
20
41
|
} | string | object;
|
|
21
42
|
};
|
|
22
43
|
inputParameters: Array<InputParameterInterface>;
|
|
23
|
-
outputParameters:
|
|
44
|
+
outputParameters: LegacyOutputParameterInterface | OutputParameterInterface;
|
|
24
45
|
mode?: ConnectorOrigin;
|
|
25
46
|
createdAt: Date;
|
|
26
47
|
}
|
|
@@ -43,7 +64,7 @@ export declare const ActionSchema: z.ZodObject<{
|
|
|
43
64
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
44
65
|
items: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
45
66
|
}, z.core.$strip>>;
|
|
46
|
-
outputParameters: z.ZodAny
|
|
67
|
+
outputParameters: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
47
68
|
mode: z.ZodOptional<z.ZodEnum<typeof ConnectorOrigin>>;
|
|
48
69
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
49
70
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { TriggerType } from './trigger-types.interface';
|
|
2
2
|
import { NodeTypes, WorkflowDrawing } from './workflow.drawing';
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
9
13
|
}
|
|
14
|
+
export type MessageMapper = {
|
|
15
|
+
[key: string]: ValueMapper | ArrayMapper;
|
|
16
|
+
};
|
|
10
17
|
export interface ConditionMapper {
|
|
11
18
|
selector: string;
|
|
12
19
|
[key: string]: string | {
|