feat: introduce action event step in flow step

This commit is contained in:
Ali BARIN
2022-01-28 20:48:56 +01:00
committed by Ömer Faruk Aydın
parent 2416ce13a7
commit e7c537f217
11 changed files with 86 additions and 33 deletions

View File

@@ -229,9 +229,6 @@
"key": "myTweet",
"description": "Will be triggered when you tweet something new.",
"subSteps": [
{
"name": "Choose app & event"
},
{
"name": "Choose account"
},
@@ -245,9 +242,6 @@
"key": "userTweet",
"description": "Will be triggered when a specific user tweet something new.",
"subSteps": [
{
"name": "Choose app & event"
},
{
"name": "Choose account"
},
@@ -273,9 +267,6 @@
"key": "createTweet",
"description": "Will create a tweet.",
"subSteps": [
{
"name": "Choose app & event"
},
{
"name": "Choose account"
},

View File

@@ -7,15 +7,16 @@ import RequestWithCurrentUser from '../../types/express/request-with-current-use
type Params = {
input: {
id: number,
key: string,
appKey: string,
id: number;
key: string;
appKey: string;
parameters: string;
flow: {
id: number,
},
id: number;
};
connection: {
id: number
},
id: number;
};
}
}
const updateStepResolver = async (params: Params, req: RequestWithCurrentUser) => {
@@ -35,6 +36,7 @@ const updateStepResolver = async (params: Params, req: RequestWithCurrentUser) =
key: input.key,
appKey: input.appKey,
connectionId: input.connection.id,
parameters: input.parameters,
});
return step;

View File

@@ -23,6 +23,7 @@ const stepType = new GraphQLObjectType({
},
}),
},
parameters: { type: GraphQLString },
connection: { type: ConnectionType },
position: { type: GraphQLInt },
},
@@ -51,6 +52,7 @@ export const stepInputType = new GraphQLInputObjectType({
},
}),
},
parameters: { type: GraphQLString },
previousStep: {
type: new GraphQLInputObjectType({
name: 'PreviousStepInput',

View File

@@ -15,7 +15,7 @@ class Step extends Base {
type!: StepEnumType;
connectionId: number;
position: number;
parameters: any;
parameters: string;
static tableName = 'steps';
@@ -31,7 +31,7 @@ class Step extends Base {
type: { type: 'string', enum: ['action', 'trigger'] },
connectionId: { type: ['integer', null] },
position: { type: 'integer' },
parameters: { type: ['object', null] },
parameters: { type: ['string', null] },
},
};