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,37 @@
{
"extends": [
"../../../../.eslintrc.json"
],
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {},
"extends": [
"plugin:prettier/recommended"
],
"plugins": ["prettier"]
},
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"rules": {}
}
]
}

View File

@@ -0,0 +1,7 @@
# pieces-scenario
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build pieces-scenario` to build the library.

View File

@@ -0,0 +1,4 @@
{
"name": "@activepieces/piece-scenario",
"version": "0.0.8"
}

View File

@@ -0,0 +1,65 @@
{
"name": "pieces-scenario",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/scenario/src",
"projectType": "library",
"release": {
"version": {
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": [
"dist/{projectRoot}"
]
}
},
"tags": [],
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/packages/pieces/community/scenario",
"tsConfig": "packages/pieces/community/scenario/tsconfig.lib.json",
"packageJson": "packages/pieces/community/scenario/package.json",
"main": "packages/pieces/community/scenario/src/index.ts",
"assets": [
"packages/pieces/community/scenario/*.md",
{
"input": "packages/pieces/community/scenario/src/i18n",
"output": "./src/i18n",
"glob": "**/!(i18n.json)"
}
],
"buildableProjectDepsInPackageJsonType": "dependencies",
"updateBuildableProjectDepsInPackageJson": true
},
"dependsOn": [
"^build",
"prebuild"
]
},
"nx-release-publish": {
"options": {
"packageRoot": "dist/{projectRoot}"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
},
"prebuild": {
"executor": "nx:run-commands",
"options": {
"cwd": "packages/pieces/community/scenario",
"command": "bun install --no-save --silent"
},
"dependsOn": [
"^build"
]
}
}
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "API-Zugangsschlüssel",
"Starts with \"api_\"": "Beginnt mit \"api_\"",
"API secret": "API-Geheimnis",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Folge [diesen Anweisungen](https://docs.scenario.com/docs/get-api-key) um deinen API-Schlüssel zu erhalten",
"Custom API Call": "Eigener API-Aufruf",
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
"Method": "Methode",
"Headers": "Kopfzeilen",
"Query Parameters": "Abfrageparameter",
"Body": "Körper",
"Response is Binary ?": "Antwort ist binär?",
"No Error on Failure": "Kein Fehler bei Fehler",
"Timeout (in seconds)": "Timeout (in Sekunden)",
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
"GET": "ERHALTEN",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "LÖSCHEN",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "Clave de acceso API",
"Starts with \"api_\"": "Comienza con \"api_\"",
"API secret": "Secreto API",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Sigue [estas instrucciones](https://docs.scenario.com/docs/get-api-key) para obtener tu clave API",
"Custom API Call": "Llamada API personalizada",
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
"Method": "Método",
"Headers": "Encabezados",
"Query Parameters": "Parámetros de consulta",
"Body": "Cuerpo",
"Response is Binary ?": "¿Respuesta es binaria?",
"No Error on Failure": "No hay ningún error en fallo",
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDFs, imágenes, etc.",
"GET": "RECOGER",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "BORRAR",
"HEAD": "LIMPIO"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "Clé d'accès API",
"Starts with \"api_\"": "Commence par \"api_\"",
"API secret": "Secret de l'API",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Suivez [ces instructions](https://docs.scenario.com/docs/get-api-key) pour obtenir votre clé API",
"Custom API Call": "Appel d'API personnalisé",
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
"Method": "Méthode",
"Headers": "En-têtes",
"Query Parameters": "Paramètres de requête",
"Body": "Corps",
"Response is Binary ?": "La réponse est Binaire ?",
"No Error on Failure": "Aucune erreur en cas d'échec",
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
"Authorization headers are injected automatically from your connection.": "Les en-têtes d'autorisation sont injectés automatiquement à partir de votre connexion.",
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "APIアクセスキー",
"Starts with \"api_\"": "\"api_\"で始まる",
"API secret": "API secret",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "API キーを取得するには、[これらの手順](https://docs.scenario.com/docs/get-api-key) に従ってください",
"Custom API Call": "カスタムAPI通話",
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
"Method": "方法",
"Headers": "ヘッダー",
"Query Parameters": "クエリパラメータ",
"Body": "本文",
"Response is Binary ?": "応答はバイナリですか?",
"No Error on Failure": "失敗時にエラーはありません",
"Timeout (in seconds)": "タイムアウト(秒)",
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
"GET": "取得",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "削除",
"HEAD": "頭"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "API toegangssleutel",
"Starts with \"api_\"": "Begint met \"api_\"",
"API secret": "API geheim",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Volg [deze instructies](https://docs.scenario.com/docs/get-api-key) om je API-sleutel te krijgen",
"Custom API Call": "Custom API Call",
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
"Method": "Methode",
"Headers": "Kopteksten",
"Query Parameters": "Query parameters",
"Body": "Lichaam",
"Response is Binary ?": "Antwoord is binair?",
"No Error on Failure": "Geen fout bij fout",
"Timeout (in seconds)": "Time-out (in seconden)",
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
"GET": "KRIJG",
"POST": "POSTE",
"PATCH": "BEKIJK",
"PUT": "PUT",
"DELETE": "VERWIJDEREN",
"HEAD": "HOOFD"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "Chave de acesso API",
"Starts with \"api_\"": "Começa com \"api_\"",
"API secret": "Segredo da API",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Siga [estas instruções](https://docs.scenario.com/docs/get-api-key) para obter a sua chave de API",
"Custom API Call": "Chamada de API personalizada",
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
"Method": "Método",
"Headers": "Cabeçalhos",
"Query Parameters": "Parâmetros da consulta",
"Body": "Conteúdo",
"Response is Binary ?": "A resposta é binária ?",
"No Error on Failure": "Nenhum erro no Failure",
"Timeout (in seconds)": "Tempo limite (em segundos)",
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
"GET": "OBTER",
"POST": "POSTAR",
"PATCH": "COMPRAR",
"PUT": "COLOCAR",
"DELETE": "EXCLUIR",
"HEAD": "CABEÇA"
}

View File

@@ -0,0 +1,22 @@
{
"Scenario": "Сценарий",
"API access key": "Ключ доступа к API",
"Starts with \"api_\"": "Начинается с \"api_\"",
"API secret": "Секрет API",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Следуйте [этим инструкциям](https://docs.scenario.com/docs/get-api-key) чтобы получить ваш ключ API",
"Custom API Call": "Пользовательский вызов API",
"Make a custom API call to a specific endpoint": "Сделать пользовательский API вызов к определенной конечной точке",
"Method": "Метод",
"Headers": "Заголовки",
"Query Parameters": "Параметры запроса",
"Body": "Тело",
"No Error on Failure": "Нет ошибок при ошибке",
"Timeout (in seconds)": "Таймаут (в секундах)",
"Authorization headers are injected automatically from your connection.": "Заголовки авторизации включаются автоматически из вашего соединения.",
"GET": "ПОЛУЧИТЬ",
"POST": "ПОСТ",
"PATCH": "ПАТЧ",
"PUT": "ПОКУПИТЬ",
"DELETE": "УДАЛИТЬ",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "API access key",
"Starts with \"api_\"": "Starts with \"api_\"",
"API secret": "API secret",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key",
"Custom API Call": "Custom API Call",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,22 @@
{
"Scenario": "Scenario",
"API access key": "API access key",
"Starts with \"api_\"": "Starts with \"api_\"",
"API secret": "API secret",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key",
"Custom API Call": "Custom API Call",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
"Body": "Body",
"No Error on Failure": "No Error on Failure",
"Timeout (in seconds)": "Timeout (in seconds)",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
"PUT": "PUT",
"DELETE": "DELETE",
"HEAD": "HEAD"
}

View File

@@ -0,0 +1,23 @@
{
"API access key": "API access key",
"Starts with \"api_\"": "Starts with \"api_\"",
"API secret": "API secret",
"Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key": "Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key",
"Custom API Call": "自定义 API 呼叫",
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
"Method": "方法",
"Headers": "信头",
"Query Parameters": "查询参数",
"Body": "正文内容",
"Response is Binary ?": "Response is Binary ?",
"No Error on Failure": "失败时没有错误",
"Timeout (in seconds)": "超时(秒)",
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
"GET": "获取",
"POST": "帖子",
"PATCH": "PATCH",
"PUT": "弹出",
"DELETE": "删除",
"HEAD": "黑色"
}

View File

@@ -0,0 +1,45 @@
import {
createPiece,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { createCustomApiCallAction } from '@activepieces/pieces-common';
import { BasicAuthConnectionValue } from '@activepieces/shared';
export const scenarioAuth = PieceAuth.BasicAuth({
description:
'Follow [these instructions](https://docs.scenario.com/docs/get-api-key) to get your API key',
required: true,
username: Property.ShortText({
displayName: 'API access key',
description: 'Starts with "api_"',
required: true,
}),
password: PieceAuth.SecretText({
displayName: 'API secret',
required: true,
}),
});
export const scenario = createPiece({
displayName: 'Scenario',
auth: scenarioAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/scenario.png',
authors: ['AdamSelene'],
actions: [
createCustomApiCallAction({
baseUrl: () => `https://api.cloud.scenario.com/v1/`,
auth: scenarioAuth,
authMapping: async (auth) => {
const { username, password } = auth;
return {
Authorization: `Basic ${Buffer.from(
`${username}:${password}`
).toString('base64')}`,
};
},
}),
],
triggers: [],
});

View File

@@ -0,0 +1,19 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
]
}

View File

@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
}