-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add create record action - Migrate all step name => action in a common folder - Separate types
- Loading branch information
Showing
27 changed files
with
268 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nty-server/src/modules/workflow/workflow-executor/interfaces/workflow-action.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
packages/twenty-server/src/modules/workflow/workflow-executor/types/workflow-action.type.ts
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
...twenty-server/src/modules/workflow/workflow-executor/types/workflow-step-settings.type.ts
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
...server/src/modules/workflow/workflow-executor/workflow-actions/code/code-action.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { ServerlessFunctionModule } from 'src/engine/metadata-modules/serverless-function/serverless-function.module'; | ||
import { ScopedWorkspaceContextFactory } from 'src/engine/twenty-orm/factories/scoped-workspace-context.factory'; | ||
import { CodeWorkflowAction } from 'src/modules/workflow/workflow-executor/workflow-actions/code/code.workflow-action'; | ||
|
||
@Module({ | ||
imports: [ServerlessFunctionModule], | ||
providers: [ScopedWorkspaceContextFactory, CodeWorkflowAction], | ||
exports: [CodeWorkflowAction], | ||
}) | ||
export class CodeActionModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...workflow/workflow-executor/workflow-actions/code/types/workflow-code-action-input.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export type WorkflowCodeActionInput = { | ||
serverlessFunctionId: string; | ||
serverlessFunctionVersion: string; | ||
serverlessFunctionInput: { | ||
[key: string]: any; | ||
}; | ||
}; |
6 changes: 6 additions & 0 deletions
6
...kflow/workflow-executor/workflow-actions/code/types/workflow-code-action-settings.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { WorkflowCodeActionInput } from 'src/modules/workflow/workflow-executor/workflow-actions/code/types/workflow-code-action-input.type'; | ||
import { BaseWorkflowActionSettings } from 'src/modules/workflow/workflow-executor/workflow-actions/types/workflow-action-settings.type'; | ||
|
||
export type WorkflowCodeActionSettings = BaseWorkflowActionSettings & { | ||
input: WorkflowCodeActionInput; | ||
}; |
8 changes: 4 additions & 4 deletions
8
...ender/exceptions/mail-sender.exception.ts → ...exceptions/send-email-action.exception.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { CustomException } from 'src/utils/custom-exception'; | ||
|
||
export class MailSenderException extends CustomException { | ||
code: MailSenderExceptionCode; | ||
constructor(message: string, code: MailSenderExceptionCode) { | ||
export class SendEmailActionException extends CustomException { | ||
code: SendEmailActionExceptionCode; | ||
constructor(message: string, code: SendEmailActionExceptionCode) { | ||
super(message, code); | ||
} | ||
} | ||
|
||
export enum MailSenderExceptionCode { | ||
export enum SendEmailActionExceptionCode { | ||
PROVIDER_NOT_SUPPORTED = 'PROVIDER_NOT_SUPPORTED', | ||
CONNECTED_ACCOUNT_NOT_FOUND = 'CONNECTED_ACCOUNT_NOT_FOUND', | ||
} |
17 changes: 17 additions & 0 deletions
17
...dules/workflow/workflow-executor/workflow-actions/mail-sender/send-email-action.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { ScopedWorkspaceContextFactory } from 'src/engine/twenty-orm/factories/scoped-workspace-context.factory'; | ||
import { OAuth2ClientManagerModule } from 'src/modules/connected-account/oauth2-client-manager/oauth2-client-manager.module'; | ||
import { GmailClientProvider } from 'src/modules/messaging/message-import-manager/drivers/gmail/providers/gmail-client.provider'; | ||
import { SendEmailWorkflowAction } from 'src/modules/workflow/workflow-executor/workflow-actions/mail-sender/send-email.workflow-action'; | ||
|
||
@Module({ | ||
imports: [OAuth2ClientManagerModule], | ||
providers: [ | ||
GmailClientProvider, | ||
ScopedWorkspaceContextFactory, | ||
SendEmailWorkflowAction, | ||
], | ||
exports: [SendEmailWorkflowAction], | ||
}) | ||
export class SendEmailActionModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.