refactor: inline auth, data, triggers and actions in apps

This commit is contained in:
Ali BARIN
2022-10-28 15:48:39 +02:00
parent 179fe512af
commit 9a973c8257
47 changed files with 233 additions and 167 deletions

View File

@@ -0,0 +1,3 @@
import sendSms from './send-sms';
export default [sendSms];

View File

@@ -16,7 +16,7 @@ export default defineAction({
{
label: 'From Number',
key: 'fromNumber',
type: 'string',
type: 'string' as const,
required: true,
description:
'The number to send the SMS from. Include country code. Example: 15551234567',
@@ -25,7 +25,7 @@ export default defineAction({
{
label: 'To Number',
key: 'toNumber',
type: 'string',
type: 'string' as const,
required: true,
description:
'The number to send the SMS to. Include country code. Example: 15551234567',
@@ -34,7 +34,7 @@ export default defineAction({
{
label: 'Message',
key: 'message',
type: 'string',
type: 'string' as const,
required: true,
description: 'The message to send.',
variables: true,

View File

@@ -6,7 +6,7 @@ export default {
{
key: 'accountSid',
label: 'Account SID',
type: 'string',
type: 'string' as const,
required: true,
readOnly: false,
value: null,
@@ -18,7 +18,7 @@ export default {
{
key: 'authToken',
label: 'Auth Token',
type: 'string',
type: 'string' as const,
required: true,
readOnly: false,
value: null,
@@ -30,7 +30,7 @@ export default {
authenticationSteps: [
{
step: 1,
type: 'mutation',
type: 'mutation' as const,
name: 'createConnection',
arguments: [
{
@@ -55,7 +55,7 @@ export default {
},
{
step: 2,
type: 'mutation',
type: 'mutation' as const,
name: 'verifyConnection',
arguments: [
{
@@ -68,7 +68,7 @@ export default {
reconnectionSteps: [
{
step: 1,
type: 'mutation',
type: 'mutation' as const,
name: 'resetConnection',
arguments: [
{
@@ -79,7 +79,7 @@ export default {
},
{
step: 2,
type: 'mutation',
type: 'mutation' as const,
name: 'updateConnection',
arguments: [
{
@@ -104,7 +104,7 @@ export default {
},
{
step: 3,
type: 'mutation',
type: 'mutation' as const,
name: 'verifyConnection',
arguments: [
{

View File

@@ -1,5 +1,7 @@
import defineApp from '../../helpers/define-app';
import addAuthHeader from './common/add-auth-header';
import auth from './auth';
import actions from './actions';
export default defineApp({
name: 'Twilio',
@@ -11,4 +13,6 @@ export default defineApp({
apiBaseUrl: 'https://api.twilio.com',
primaryColor: 'e1000f',
beforeRequest: [addAuthHeader],
auth,
actions,
});