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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Erstellen Sie den Genehmigungsprozess in Ihren Workflows",
"Wait for Approval": "Warten auf Genehmigung",
"Create Approval Links": "Links zur Genehmigung erstellen",
"Pauses the flow and wait for the approval from the user": "Pausiert den Fluss und wartet auf die Genehmigung des Benutzers",
"Create links only without pausing the flow, use wait for approval to pause": "Erstelle Links nur ohne den Fluss zu pausieren, benutze Wartezeit um zu pausieren",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Bitte verwenden Sie stattdessen die Manuelle Aufgabenfunktion ab 0.48.0 und höher"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Construir proceso de aprobación en sus flujos de trabajo",
"Wait for Approval": "Espere a la aprobación",
"Create Approval Links": "Crear enlaces de aprobación",
"Pauses the flow and wait for the approval from the user": "Pausa el flujo y espera la aprobación del usuario",
"Create links only without pausing the flow, use wait for approval to pause": "Crear enlaces solo sin pausar el flujo, usar esperar aprobación para pausar",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Por favor, utilice la función de tarea manual en lugar de 0.48.0 o superior"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Construire le processus d'approbation dans vos workflows",
"Wait for Approval": "Attendre l'approbation",
"Create Approval Links": "Créer des liens d'approbation",
"Pauses the flow and wait for the approval from the user": "Met le flow en pause et attend l'approbation de l'utilisateur",
"Create links only without pausing the flow, use wait for approval to pause": "Créer des liens uniquement sans interrompre le flow, utiliser attendre l'approbation pour mettre en pause",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Veuillez utiliser la fonctionnalité de tâche manuelle à la place de 0.48.0 et supérieure"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "ワークフローで承認プロセスを構築する",
"Wait for Approval": "承認待ち",
"Create Approval Links": "承認リンクを作成",
"Pauses the flow and wait for the approval from the user": "フローを一時停止し、ユーザーの承認を待つ",
"Create links only without pausing the flow, use wait for approval to pause": "フローを一時停止せずにリンクを作成します。承認待ちを使用してください",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "0.48.0以降の手動タスク機能を使用してください"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Bouw goedkeuringsproces in uw workflows",
"Wait for Approval": "Wacht op goedkeuring",
"Create Approval Links": "Maak goedkeuringslinks",
"Pauses the flow and wait for the approval from the user": "Onderbreekt de stroom en wacht op de goedkeuring van de gebruiker",
"Create links only without pausing the flow, use wait for approval to pause": "Maak links aan zonder de flow te onderbreken, gebruik wachten op goedkeuring",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Gebruik de handmatige takenfunctie vanaf 0.48.0 en hoger"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Criar processo de aprovação em seus fluxos de trabalho",
"Wait for Approval": "Esperar aprovação",
"Create Approval Links": "Criar links de aprovação",
"Pauses the flow and wait for the approval from the user": "Pausa o fluxo e aguarda a aprovação do usuário",
"Create links only without pausing the flow, use wait for approval to pause": "Criar links apenas sem pausar o fluxo, use esperar por aprovação",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Utilize o recurso de Tarefa Manual ao invés da versão 0.48.0 ou superior"
}

View File

@@ -0,0 +1,10 @@
{
"Approval (Legacy)": "Одобрение (Legacy)",
"Build approval process in your workflows": "Постройте процесс утверждения в ваших рабочих процессах",
"Wait for Approval": "Дождитесь утверждения",
"Create Approval Links": "Создать ссылки на утверждение",
"Pauses the flow and wait for the approval from the user": "Приостанавливает поток и ждет одобрения пользователя",
"Create links only without pausing the flow, use wait for approval to pause": "Создавать ссылки только без паузы потока, ожидать разрешения на паузу",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Используйте Ручную задачу вместо 0.48.0 и выше"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Build approval process in your workflows",
"Wait for Approval": "Wait for Approval",
"Create Approval Links": "Create Approval Links",
"Pauses the flow and wait for the approval from the user": "Pauses the flow and wait for the approval from the user",
"Create links only without pausing the flow, use wait for approval to pause": "Create links only without pausing the flow, use wait for approval to pause",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Please use Manual Task feature instead from 0.48.0 and above"
}

View File

@@ -0,0 +1,10 @@
{
"Approval (Legacy)": "Approval (Legacy)",
"Build approval process in your workflows": "Build approval process in your workflows",
"Wait for Approval": "Wait for Approval",
"Create Approval Links": "Create Approval Links",
"Pauses the flow and wait for the approval from the user": "Pauses the flow and wait for the approval from the user",
"Create links only without pausing the flow, use wait for approval to pause": "Create links only without pausing the flow, use wait for approval to pause",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Please use Manual Task feature instead from 0.48.0 and above"
}

View File

@@ -0,0 +1,9 @@
{
"Build approval process in your workflows": "Build approval process in your workflows",
"Wait for Approval": "Wait for Approval",
"Create Approval Links": "Create Approval Links",
"Pauses the flow and wait for the approval from the user": "Pauses the flow and wait for the approval from the user",
"Create links only without pausing the flow, use wait for approval to pause": "Create links only without pausing the flow, use wait for approval to pause",
"Markdown": "Markdown",
"Please use Manual Task feature instead from 0.48.0 and above": "Please use Manual Task feature instead from 0.48.0 and above"
}

View File

@@ -0,0 +1,16 @@
import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { createApprovalLink } from './lib/actions/create-approval-link';
import { waitForApprovalLink } from './lib/actions/wait-for-approval';
export const approval = createPiece({
displayName: 'Approval (Legacy)',
description: 'Build approval process in your workflows',
auth: PieceAuth.None(),
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/approval.svg',
authors: ["kishanprmr","MoShizzle","khaledmashaly","abuaboud"],
categories: [PieceCategory.CORE, PieceCategory.FLOW_CONTROL],
actions: [waitForApprovalLink, createApprovalLink],
triggers: [],
});

View File

@@ -0,0 +1,34 @@
import { createAction, PieceAuth, Property } from '@activepieces/pieces-framework';
import { MarkdownVariant } from '@activepieces/shared';
export const createApprovalLink = createAction({
auth: PieceAuth.None(),
name: 'create_approval_links',
displayName: 'Create Approval Links',
description:
'Create links only without pausing the flow, use wait for approval to pause',
props: {
markdown: Property.MarkDown({
variant: MarkdownVariant.WARNING,
value: 'Please use Manual Task feature instead from 0.48.0 and above',
}),
},
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
async run(ctx) {
return {
approvalLink: ctx.generateResumeUrl({
queryParams: { action: 'approve' },
}),
disapprovalLink: ctx.generateResumeUrl({
queryParams: { action: 'disapprove' },
}),
};
},
});

View File

@@ -0,0 +1,41 @@
import { createAction, PieceAuth, Property } from '@activepieces/pieces-framework';
import { ExecutionType, MarkdownVariant, PauseType } from '@activepieces/shared';
export const waitForApprovalLink = createAction({
auth: PieceAuth.None(),
name: 'wait_for_approval',
displayName: 'Wait for Approval',
description: 'Pauses the flow and wait for the approval from the user',
props: {
markdown: Property.MarkDown({
variant: MarkdownVariant.WARNING,
value: 'Please use Manual Task feature instead from 0.48.0 and above',
}),
},
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
async run(ctx) {
if (ctx.executionType === ExecutionType.BEGIN) {
ctx.run.pause({
pauseMetadata: {
type: PauseType.WEBHOOK,
response: {}
},
});
return {
approved: true,
};
} else {
return {
approved: ctx.resumePayload.queryParams['action'] === 'approve',
};
}
},
});

View File

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

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"]
}