Add Activepieces integration for workflow automation

- 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>
This commit is contained in:
poduck
2025-12-18 22:59:37 -05:00
parent 9848268d34
commit 3aa7199503
16292 changed files with 1284892 additions and 4708 deletions

View File

@@ -0,0 +1,17 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { newLead } from './lib/triggers/new-lead';
import { luxuryPresenceAuth } from './lib/common/auth';
import { PieceCategory } from '@activepieces/shared';
export const luxuryPresence = createPiece({
displayName: 'Luxury Presence',
auth: luxuryPresenceAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/luxury-presence.png',
description:
'Luxury Presence is a software company designed for real estate agents. Their all-in-one platform combines a CRM, website builder, marketing tools, and more to help agents grow their business and close more deals.',
categories: [PieceCategory.SALES_AND_CRM],
authors: ['sanket-a11y'],
actions: [],
triggers: [newLead],
});

View File

@@ -0,0 +1,19 @@
import { PieceAuth } from '@activepieces/pieces-framework';
export const luxuryPresenceAuth = PieceAuth.SecretText({
displayName: 'API Key',
description: `Generating and Managing API Keys
API Keys can be generated via the dashboard located here, or by following these steps:
1. Login to your Luxury Presence account: app.luxurypresence.com.
2. Click on your profile icon in the bottom left-hand corner.
3. Navigate to Settings > API Keys > Generate Key.
4. Type in a Key Description for your API key to help easily recognize it later.
5. Click Generate Key.
6. Copy your API Key, and store it in a safe place.
You must have the role of admin in your account to be able to manage API Keys.
`,
required: true,
});

View File

@@ -0,0 +1,64 @@
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
import { luxuryPresenceAuth } from '../common/auth';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
const LUXURY_PRESENCE_API_BASE = 'https://api.luxurypresence.com/crm/v1';
export const newLead = createTrigger({
auth: luxuryPresenceAuth,
name: 'newLead',
displayName: 'New Lead',
description: '',
props: {},
sampleData: {},
type: TriggerStrategy.WEBHOOK,
async onEnable(context) {
const apiKey = context.auth.secret_text;
const url = `${LUXURY_PRESENCE_API_BASE}/webhooks`;
const resp = await httpClient.sendRequest({
method: HttpMethod.POST,
url,
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: {
name: 'ActivePieces New Lead Webhook',
url: context.webhookUrl,
events: ['leads'],
},
});
const body = await resp.body;
await context.store.put('webhook_id', body.id);
},
async onDisable(context) {
const apiKey = context.auth.secret_text;
const webhookId = (await context.store.get('webhook_id')) as string | null;
if (webhookId) {
const deleteUrl = `${LUXURY_PRESENCE_API_BASE}/webhooks/${encodeURIComponent(
webhookId
)}`;
await httpClient.sendRequest({
method: HttpMethod.DELETE,
url: deleteUrl,
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
});
}
await context.store.delete('webhook_id');
},
async run(context) {
const payload = context.payload.body as any;
if (payload.eventName !== 'leads') {
return [];
}
return [context.payload.body];
},
});