- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
194 lines
5.4 KiB
TypeScript
194 lines
5.4 KiB
TypeScript
import {
|
|
createPiece,
|
|
PieceAuth,
|
|
Property,
|
|
} from '@activepieces/pieces-framework';
|
|
import { SES, GetSendQuotaCommand } from '@aws-sdk/client-ses';
|
|
import { sendEmail } from './lib/actions/send-email';
|
|
import { createEmailTemplate } from './lib/actions/create-email-template';
|
|
import { sendTemplatedEmail } from './lib/actions/send-templated-email';
|
|
import { updateEmailTemplate } from './lib/actions/update-email-template';
|
|
import { createCustomVerificationEmailTemplate } from './lib/actions/create-custom-verification-email-template';
|
|
import { sendCustomVerificationEmail } from './lib/actions/send-custom-verification-email';
|
|
import { updateCustomVerificationEmailTemplate } from './lib/actions/update-custom-verification-email-template';
|
|
|
|
export const amazonSesAuth = PieceAuth.CustomAuth({
|
|
props: {
|
|
accessKeyId: Property.ShortText({
|
|
displayName: 'Access Key ID',
|
|
required: true,
|
|
}),
|
|
secretAccessKey: PieceAuth.SecretText({
|
|
displayName: 'Secret Access Key',
|
|
required: true,
|
|
}),
|
|
region: Property.StaticDropdown({
|
|
displayName: 'Region',
|
|
options: {
|
|
options: [
|
|
{
|
|
label: 'Default',
|
|
value: 'us-east-1',
|
|
},
|
|
{
|
|
label: 'US East (N. Virginia) [us-east-1]',
|
|
value: 'us-east-1',
|
|
},
|
|
{
|
|
label: 'US East (Ohio) [us-east-2]',
|
|
value: 'us-east-2',
|
|
},
|
|
{
|
|
label: 'US West (N. California) [us-west-1]',
|
|
value: 'us-west-1',
|
|
},
|
|
{
|
|
label: 'US West (Oregon) [us-west-2]',
|
|
value: 'us-west-2',
|
|
},
|
|
{
|
|
label: 'Africa (Cape Town) [af-south-1]',
|
|
value: 'af-south-1',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Hong Kong) [ap-east-1]',
|
|
value: 'ap-east-1',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Mumbai) [ap-south-1]',
|
|
value: 'ap-south-1',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Osaka-Local) [ap-northeast-3]',
|
|
value: 'ap-northeast-3',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Seoul) [ap-northeast-2]',
|
|
value: 'ap-northeast-2',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Singapore) [ap-southeast-1]',
|
|
value: 'ap-southeast-1',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Sydney) [ap-southeast-2]',
|
|
value: 'ap-southeast-2',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Tokyo) [ap-northeast-1]',
|
|
value: 'ap-northeast-1',
|
|
},
|
|
{
|
|
label: 'Canada (Central) [ca-central-1]',
|
|
value: 'ca-central-1',
|
|
},
|
|
{
|
|
label: 'Europe (Frankfurt) [eu-central-1]',
|
|
value: 'eu-central-1',
|
|
},
|
|
{
|
|
label: 'Europe (Ireland) [eu-west-1]',
|
|
value: 'eu-west-1',
|
|
},
|
|
{
|
|
label: 'Europe (London) [eu-west-2]',
|
|
value: 'eu-west-2',
|
|
},
|
|
{
|
|
label: 'Europe (Milan) [eu-south-1]',
|
|
value: 'eu-south-1',
|
|
},
|
|
{
|
|
label: 'Europe (Paris) [eu-west-3]',
|
|
value: 'eu-west-3',
|
|
},
|
|
{
|
|
label: 'Europe (Stockholm) [eu-north-1]',
|
|
value: 'eu-north-1',
|
|
},
|
|
{
|
|
label: 'Middle East (Bahrain) [me-south-1]',
|
|
value: 'me-south-1',
|
|
},
|
|
{
|
|
label: 'South America (São Paulo) [sa-east-1]',
|
|
value: 'sa-east-1',
|
|
},
|
|
{
|
|
label: 'Europe (Spain) [eu-south-2]',
|
|
value: 'eu-south-2',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Hyderabad) [ap-south-2]',
|
|
value: 'ap-south-2',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Jakarta) [ap-southeast-3]',
|
|
value: 'ap-southeast-3',
|
|
},
|
|
{
|
|
label: 'Asia Pacific (Melbourne) [ap-southeast-4]',
|
|
value: 'ap-southeast-4',
|
|
},
|
|
{
|
|
label: 'China (Beijing) [cn-north-1]',
|
|
value: 'cn-north-1',
|
|
},
|
|
{
|
|
label: 'China (Ningxia) [cn-northwest-1]',
|
|
value: 'cn-northwest-1',
|
|
},
|
|
{
|
|
label: 'Europe (Zurich) [eu-central-2]',
|
|
value: 'eu-central-2',
|
|
},
|
|
{
|
|
label: 'Middle East (UAE) [me-central-1]',
|
|
value: 'me-central-1',
|
|
},
|
|
],
|
|
},
|
|
required: true,
|
|
}),
|
|
},
|
|
validate: async ({ auth }) => {
|
|
try {
|
|
const ses = new SES({
|
|
credentials: {
|
|
accessKeyId: auth.accessKeyId,
|
|
secretAccessKey: auth.secretAccessKey,
|
|
},
|
|
region: auth.region,
|
|
});
|
|
await ses.send(new GetSendQuotaCommand({}));
|
|
return {
|
|
valid: true,
|
|
};
|
|
} catch (e) {
|
|
return {
|
|
valid: false,
|
|
error: (e as Error)?.message,
|
|
};
|
|
}
|
|
},
|
|
required: true,
|
|
});
|
|
|
|
export const amazonSes = createPiece({
|
|
displayName: 'Amazon SES',
|
|
auth: amazonSesAuth,
|
|
minimumSupportedRelease: '0.36.1',
|
|
logoUrl: 'https://cdn.activepieces.com/pieces/amazon-ses.png',
|
|
authors: ["fortunamide"],
|
|
actions: [
|
|
sendEmail,
|
|
createEmailTemplate,
|
|
sendTemplatedEmail,
|
|
updateEmailTemplate,
|
|
createCustomVerificationEmailTemplate,
|
|
sendCustomVerificationEmail,
|
|
updateCustomVerificationEmailTemplate,
|
|
],
|
|
triggers: [],
|
|
});
|