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,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket ermöglicht die Echtzeit-Kommunikation über den AnyHook Proxy-Server, indem Sie Websocket-Ereignisse abonnieren und hören können",
"AnyHook Server URL": "AnyHook Server URL",
"The URL of your AnyHook server": "Die URL deines AnyHook Servers",
"New Websocket Subscription Event": "Neues Websocket-Abonnement-Ereignis",
"Triggers on a new Websocket subscription event": "Löst ein neues Websocket-Abonnement-Ereignis aus",
"Endpoint URL": "Endpoint URL",
"Headers": "Kopfzeilen",
"Subscription Message": "Abonnementnachricht",
"Websocket endpoint URL to connect to.": "Websocket Endpunkt-URL, mit der eine Verbindung hergestellt wird.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Benutzerdefinierte Header für die Websocket-Verbindung, wie Authentifizierungs-Token.",
"The message to send to the Websocket server to subscribe to events.": "Die Nachricht, die an den Websocket-Server gesendet wird, um Ereignisse zu abonnieren."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket permite la comunicación en tiempo real a través del servidor proxy de AnyHook permitiéndole suscribirse y escuchar eventos de websocket",
"AnyHook Server URL": "URL del servidor AnyHook",
"The URL of your AnyHook server": "La URL de tu servidor AnyHook",
"New Websocket Subscription Event": "Nuevo Evento de Suscripción Websocket",
"Triggers on a new Websocket subscription event": "Activadores en un nuevo evento de suscripción Websocket",
"Endpoint URL": "Endpoint URL",
"Headers": "Encabezados",
"Subscription Message": "Mensaje de suscripción",
"Websocket endpoint URL to connect to.": "URL del endpoint de Websocket al que conectar.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Encabezados personalizados para la conexión Websocket, tales como tokens de autenticación.",
"The message to send to the Websocket server to subscribe to events.": "El mensaje a enviar al servidor Websocket para suscribirse a eventos."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket permet la communication en temps réel via le serveur proxy AnyHook en vous permettant de vous abonner et d'écouter les événements websocket",
"AnyHook Server URL": "URL du serveur AnyHook",
"The URL of your AnyHook server": "L'URL de votre serveur AnyHook",
"New Websocket Subscription Event": "Nouvel événement d'abonnement Websocket",
"Triggers on a new Websocket subscription event": "Déclenche sur un nouvel événement d'abonnement Websocket",
"Endpoint URL": "Endpoint URL",
"Headers": "En-têtes",
"Subscription Message": "Message d'abonnement",
"Websocket endpoint URL to connect to.": "URL de terminaison Websocket à laquelle se connecter.",
"Custom headers for the Websocket connection, such as authentication tokens.": "En-têtes personnalisés pour la connexion Websocket, tels que les jetons d'authentification.",
"The message to send to the Websocket server to subscribe to events.": "Le message à envoyer au serveur Websocket pour s'abonner aux événements."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHookのWebSocketは、WebSocketイベントを購読してリッスンできるようにすることで、AnyHookプロキシサーバーを介してリアルタイムで通信できます。",
"AnyHook Server URL": "AnyHookサーバーのURL",
"The URL of your AnyHook server": "AnyHookサーバーのURL",
"New Websocket Subscription Event": "新しいWebSocketサブスクリプションイベント",
"Triggers on a new Websocket subscription event": "新しいWebSocketサブスクリプションイベントでトリガー",
"Endpoint URL": "Endpoint URL",
"Headers": "ヘッダー",
"Subscription Message": "サブスクリプションメッセージ",
"Websocket endpoint URL to connect to.": "接続するWebSocketエンドポイントURL。",
"Custom headers for the Websocket connection, such as authentication tokens.": "認証トークンなど、WebSocket接続のカスタムヘッダー。",
"The message to send to the Websocket server to subscribe to events.": "イベントを購読するためにWebSocketサーバーに送信するメッセージ。"
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket maakt real-time communicatie via AnyHook proxy server mogelijk door je te abonneren op en luisteren naar websocket evenementen",
"AnyHook Server URL": "AnyHook server-URL",
"The URL of your AnyHook server": "De URL van uw AnyHook server",
"New Websocket Subscription Event": "Nieuw Websocket abonnement evenement",
"Triggers on a new Websocket subscription event": "Triggert op een nieuwe Websocket-abonnement gebeurtenis",
"Endpoint URL": "Endpoint URL",
"Headers": "Kopteksten",
"Subscription Message": "Abonnement bericht",
"Websocket endpoint URL to connect to.": "Websocket eindpunt URL om mee te verbinden.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Aangepaste headers voor de Websocket-verbinding, zoals authenticatietokens.",
"The message to send to the Websocket server to subscribe to events.": "Het bericht om naar de Websocket-server te sturen om u te abonneren op gebeurtenissen."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket permite comunicação em tempo real através do servidor proxy AnyHook, permitindo que você se inscreva e ouça eventos de websocket",
"AnyHook Server URL": "URL do servidor AnyHook",
"The URL of your AnyHook server": "A URL do seu servidor AnyHook",
"New Websocket Subscription Event": "Novo evento de assinatura de Websocket",
"Triggers on a new Websocket subscription event": "Aciona em um novo evento de assinatura do Websocket",
"Endpoint URL": "Endpoint URL",
"Headers": "Cabeçalhos",
"Subscription Message": "Mensagem de Assinatura",
"Websocket endpoint URL to connect to.": "URL de endpoint Websocket para se conectar.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Cabeçalhos personalizados para a conexão Websocket, como tokens de autenticação.",
"The message to send to the Websocket server to subscribe to events.": "A mensagem a enviar para o servidor Websocket para assinar eventos."
}

View File

@@ -0,0 +1,14 @@
{
"AnyHook Websocket": "Веб-сокет AnyHook",
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket позволяет общаться в реальном времени через AnyHook прокси сервер, позволяя подписаться и слушать события веб-сокетов",
"AnyHook Server URL": "URL сервера AnyHook",
"The URL of your AnyHook server": "URL вашего сервера AnyHook",
"New Websocket Subscription Event": "Новое событие подписки на веб-сокет",
"Triggers on a new Websocket subscription event": "Триггеры при новом событии подписки на Websocket",
"Endpoint URL": "Endpoint URL",
"Headers": "Заголовки",
"Subscription Message": "Сообщение о подписке",
"Websocket endpoint URL to connect to.": "URL-адрес конечной точки веб-сокета для подключения.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Пользовательские заголовки для соединения с Websocket, такие как токены аутентификации.",
"The message to send to the Websocket server to subscribe to events.": "Сообщение для отправки на сервер Websocket для подписки на события."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events",
"AnyHook Server URL": "AnyHook Server URL",
"The URL of your AnyHook server": "The URL of your AnyHook server",
"New Websocket Subscription Event": "New Websocket Subscription Event",
"Triggers on a new Websocket subscription event": "Triggers on a new Websocket subscription event",
"Endpoint URL": "Endpoint URL",
"Headers": "Headers",
"Subscription Message": "Subscription Message",
"Websocket endpoint URL to connect to.": "Websocket endpoint URL to connect to.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Custom headers for the Websocket connection, such as authentication tokens.",
"The message to send to the Websocket server to subscribe to events.": "The message to send to the Websocket server to subscribe to events."
}

View File

@@ -0,0 +1,14 @@
{
"AnyHook Websocket": "AnyHook Websocket",
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events",
"AnyHook Server URL": "AnyHook Server URL",
"The URL of your AnyHook server": "The URL of your AnyHook server",
"New Websocket Subscription Event": "New Websocket Subscription Event",
"Triggers on a new Websocket subscription event": "Triggers on a new Websocket subscription event",
"Endpoint URL": "Endpoint URL",
"Headers": "Headers",
"Subscription Message": "Subscription Message",
"Websocket endpoint URL to connect to.": "Websocket endpoint URL to connect to.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Custom headers for the Websocket connection, such as authentication tokens.",
"The message to send to the Websocket server to subscribe to events.": "The message to send to the Websocket server to subscribe to events."
}

View File

@@ -0,0 +1,13 @@
{
"AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events": "AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events",
"AnyHook Server URL": "AnyHook Server URL",
"The URL of your AnyHook server": "The URL of your AnyHook server",
"New Websocket Subscription Event": "New Websocket Subscription Event",
"Triggers on a new Websocket subscription event": "Triggers on a new Websocket subscription event",
"Endpoint URL": "Endpoint URL",
"Headers": "信头",
"Subscription Message": "Subscription Message",
"Websocket endpoint URL to connect to.": "Websocket endpoint URL to connect to.",
"Custom headers for the Websocket connection, such as authentication tokens.": "Custom headers for the Websocket connection, such as authentication tokens.",
"The message to send to the Websocket server to subscribe to events.": "The message to send to the Websocket server to subscribe to events."
}

View File

@@ -0,0 +1,18 @@
import { createPiece } from '@activepieces/pieces-framework';
import { websocketCommon } from './lib/common/common';
import { websocketSubscriptionTrigger } from './lib/triggers/websocket-subscription-trigger';
export const anyHookWebsocket = createPiece({
displayName: 'AnyHook Websocket',
description:
'AnyHook Websocket enables real-time communication through AnyHook proxy server by allowing you to subscribe and listen to websocket events',
auth: websocketCommon.auth,
minimumSupportedRelease: '0.20.0',
logoUrl:
'https://cdn.activepieces.com/pieces/anyhook-websocket.png',
authors: ['Swanblocks/Ahmad Shawar'],
actions: [],
triggers: [
websocketSubscriptionTrigger,
],
});

View File

@@ -0,0 +1,30 @@
import { PieceAuth, Property } from '@activepieces/pieces-framework';
export const websocketCommon = {
connectionType: "websocket",
auth: PieceAuth.CustomAuth({
required: true,
props: {
proxyBaseUrl: Property.ShortText({
displayName: 'AnyHook Server URL',
description: 'The URL of your AnyHook server',
required: true,
defaultValue: 'http://10.0.0.101:3001'
}),
},
}),
apiCall: async function (
url: string,
method: string,
data: object | undefined = undefined
) {
const response = await fetch(url, {
method,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
return response.json();
},
};

View File

@@ -0,0 +1,31 @@
import { websocketCommon } from '../common/common';
export async function createWebsocketSubscription(
websocketUrl: string,
headers: Record<string, unknown> | undefined,
message: Record<string, unknown>,
webhookUrl: string,
proxyBaseUrl: string
) {
const subscriptionApiUrl = `${proxyBaseUrl}/subscribe`;
const data = {
connection_type: websocketCommon.connectionType,
webhook_url: webhookUrl,
args: {
endpoint_url: websocketUrl,
headers: headers ? JSON.stringify(headers) : undefined,
message,
},
};
const response = await websocketCommon.apiCall(subscriptionApiUrl, 'POST', data);
return response;
}
export async function deleteWebsocketSubscription(subscriptionId: string, proxyBaseUrl: string) {
const deleteApiUrl = `${proxyBaseUrl}/unsubscribe`;
const data = {
subscription_id: subscriptionId,
};
const response = await websocketCommon.apiCall(deleteApiUrl, 'POST', data);
return response;
}

View File

@@ -0,0 +1,66 @@
import { TriggerStrategy, createTrigger, PieceAuth, Property } from '@activepieces/pieces-framework';
import { createWebsocketSubscription, deleteWebsocketSubscription } from './helpers';
import { websocketCommon } from '../common/common';
export const websocketSubscriptionTrigger = createTrigger({
auth: websocketCommon.auth,
name: 'websocket_subscription_trigger',
displayName: 'New Websocket Subscription Event',
description: 'Triggers on a new Websocket subscription event',
type: TriggerStrategy.WEBHOOK,
props: {
websocketUrl: Property.ShortText({
displayName: 'Endpoint URL',
description: 'Websocket endpoint URL to connect to.',
required: true,
defaultValue: 'wss://testnets-stream.openseabeta.com/socket/websocket?token=xxxx',
}),
headers: Property.Object({
displayName: 'Headers',
description: 'Custom headers for the Websocket connection, such as authentication tokens.',
required: false
}),
message: Property.Json({
displayName: 'Subscription Message',
description: 'The message to send to the Websocket server to subscribe to events.',
required: true,
defaultValue: {
"topic": "collection:boredapeyachtclub",
"event": "phx_join",
"payload": {},
"ref": 0
}
}),
},
async onEnable(context) {
const subscriptionInfo = await createWebsocketSubscription(
context.propsValue.websocketUrl,
context.propsValue.headers,
context.propsValue.message,
context.webhookUrl,
context.auth.props.proxyBaseUrl
);
// Store subscription info
await context.store.put('websocket_subscription_trigger', subscriptionInfo.subscriptionId);
},
async onDisable(context) {
const subscriptionId: string = (await context.store.get('websocket_subscription_trigger')) as string;
if (subscriptionId) {
await deleteWebsocketSubscription(subscriptionId, context.auth.props.proxyBaseUrl);
await context.store.delete('websocket_subscription_trigger');
}
},
async run(context) {
return [context.payload.body];
},
async test(context) {
return [
{
event: 'Websocket event data',
details: 'Details of the event',
},
];
},
sampleData: {},
});