refactor: inline auth, data, triggers and actions in apps
This commit is contained in:
3
packages/backend/src/apps/smtp/actions/index.ts
Normal file
3
packages/backend/src/apps/smtp/actions/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import sendEmail from './send-email';
|
||||
|
||||
export default [sendEmail];
|
@@ -18,7 +18,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'From name',
|
||||
key: 'fromName',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description: 'Display name of the sender.',
|
||||
variables: true,
|
||||
@@ -26,7 +26,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'From email',
|
||||
key: 'fromEmail',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Email address of the sender.',
|
||||
variables: true,
|
||||
@@ -34,7 +34,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Reply to',
|
||||
key: 'replyTo',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description:
|
||||
'Email address to reply to. Defaults to the from email address.',
|
||||
@@ -43,7 +43,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'To',
|
||||
key: 'to',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description:
|
||||
'Comma seperated list of email addresses to send the email to.',
|
||||
@@ -52,7 +52,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Cc',
|
||||
key: 'cc',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description: 'Comma seperated list of email addresses.',
|
||||
variables: true,
|
||||
@@ -60,7 +60,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Bcc',
|
||||
key: 'bcc',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description: 'Comma seperated list of email addresses.',
|
||||
variables: true,
|
||||
@@ -68,7 +68,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Subject',
|
||||
key: 'subject',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Subject of the email.',
|
||||
variables: true,
|
||||
@@ -76,7 +76,7 @@ export default defineAction({
|
||||
{
|
||||
label: 'Body',
|
||||
key: 'body',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Body of the email.',
|
||||
variables: true,
|
||||
|
@@ -6,7 +6,7 @@ export default {
|
||||
{
|
||||
key: 'host',
|
||||
label: 'Host',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
{
|
||||
key: 'username',
|
||||
label: 'Email/Username',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Password',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
{
|
||||
key: 'useTls',
|
||||
label: 'Use TLS?',
|
||||
type: 'dropdown',
|
||||
type: 'dropdown' as const,
|
||||
required: false,
|
||||
readOnly: false,
|
||||
value: false,
|
||||
@@ -64,10 +64,10 @@ export default {
|
||||
{
|
||||
key: 'port',
|
||||
label: 'Port',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
readOnly: false,
|
||||
value: 25,
|
||||
value: '25',
|
||||
placeholder: null,
|
||||
description: null,
|
||||
docUrl: 'https://automatisch.io/docs/smtp#port',
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
{
|
||||
key: 'fromEmail',
|
||||
label: 'From Email',
|
||||
type: 'string',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
readOnly: false,
|
||||
value: null,
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
authenticationSteps: [
|
||||
{
|
||||
step: 1,
|
||||
type: 'mutation',
|
||||
type: 'mutation' as const,
|
||||
name: 'createConnection',
|
||||
arguments: [
|
||||
{
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
},
|
||||
{
|
||||
step: 2,
|
||||
type: 'mutation',
|
||||
type: 'mutation' as const,
|
||||
name: 'verifyConnection',
|
||||
arguments: [
|
||||
{
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
reconnectionSteps: [
|
||||
{
|
||||
step: 1,
|
||||
type: 'mutation',
|
||||
type: 'mutation' as const,
|
||||
name: 'resetConnection',
|
||||
arguments: [
|
||||
{
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
},
|
||||
{
|
||||
step: 2,
|
||||
type: 'mutation',
|
||||
type: 'mutation' as const,
|
||||
name: 'updateConnection',
|
||||
arguments: [
|
||||
{
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
},
|
||||
{
|
||||
step: 3,
|
||||
type: 'mutation',
|
||||
type: 'mutation' as const,
|
||||
name: 'verifyConnection',
|
||||
arguments: [
|
||||
{
|
||||
|
@@ -1,4 +1,6 @@
|
||||
import defineApp from '../../helpers/define-app';
|
||||
import auth from './auth';
|
||||
import actions from './actions';
|
||||
|
||||
export default defineApp({
|
||||
name: 'SMTP',
|
||||
@@ -10,4 +12,6 @@ export default defineApp({
|
||||
apiBaseUrl: '',
|
||||
primaryColor: '2DAAE1',
|
||||
beforeRequest: [],
|
||||
auth,
|
||||
actions,
|
||||
});
|
||||
|
Reference in New Issue
Block a user