6658 workflows add a first twenty piece email sender (#6965)

This commit is contained in:
martmull
2024-09-12 11:00:25 +02:00
committed by GitHub
parent f8e5b333d9
commit 3190f4a87b
397 changed files with 1143 additions and 1037 deletions

View File

@ -14,7 +14,7 @@ describe('addCreateStepNodes', () => {
{
id: 'step1',
name: 'Step 1',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {
@ -27,7 +27,7 @@ describe('addCreateStepNodes', () => {
{
id: 'step2',
name: 'Step 2',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {

View File

@ -35,7 +35,7 @@ describe('generateWorkflowDiagram', () => {
{
id: 'step1',
name: 'Step 1',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {
@ -48,7 +48,7 @@ describe('generateWorkflowDiagram', () => {
{
id: 'step2',
name: 'Step 2',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {
@ -88,7 +88,7 @@ describe('generateWorkflowDiagram', () => {
{
id: 'step1',
name: 'Step 1',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {
@ -101,7 +101,7 @@ describe('generateWorkflowDiagram', () => {
{
id: 'step2',
name: 'Step 2',
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
settings: {
errorHandlingOptions: {

View File

@ -60,7 +60,7 @@ describe('getWorkflowVersionDiagram', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
],

View File

@ -27,7 +27,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
};
@ -65,7 +65,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
};
@ -97,7 +97,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
{
@ -110,7 +110,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
],
@ -131,7 +131,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
};
@ -167,7 +167,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
{
@ -180,7 +180,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
],
@ -201,7 +201,7 @@ describe('insertStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
};

View File

@ -13,7 +13,7 @@ describe('replaceStep', () => {
},
serverlessFunctionId: 'first',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
} satisfies WorkflowStep;
const workflowVersionInitial = {
@ -59,7 +59,7 @@ describe('replaceStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
};
const workflowVersionInitial = {
@ -79,7 +79,7 @@ describe('replaceStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
stepToBeReplaced,
@ -93,7 +93,7 @@ describe('replaceStep', () => {
},
serverlessFunctionId: 'a5434be2-c10b-465c-acec-46492782a997',
},
type: 'CODE_ACTION',
type: 'CODE',
valid: true,
},
],

View File

@ -50,13 +50,6 @@ export const generateWorkflowDiagram = ({
},
});
// Recursively generate flow for the next action if it exists
if (step.type !== 'CODE_ACTION') {
// processNode(action.nextAction, nodeId, xPos + 150, yPos + 100);
throw new Error('Other types as code actions are not supported yet.');
}
return nodeId;
};

View File

@ -7,11 +7,11 @@ export const getStepDefaultDefinition = (
const newStepId = v4();
switch (type) {
case 'CODE_ACTION': {
case 'CODE': {
return {
id: newStepId,
name: 'Code',
type: 'CODE_ACTION',
type: 'CODE',
valid: false,
settings: {
serverlessFunctionId: '',