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-math-helper
This library was generated with [Nx](https://nx.dev).
## Building
Run `nx build pieces-math-helper` to build the library.

View File

@@ -0,0 +1,4 @@
{
"name": "@activepieces/piece-math-helper",
"version": "0.0.17"
}

View File

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

View File

@@ -0,0 +1,18 @@
{
"Math Helper": "Math Helper",
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nFühre mathematische Operationen aus.\n",
"Addition": "Hinzufügen",
"Subtraction": "Abzug",
"Multiplication": "Multiplikation",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Zufällige Nummer generieren",
"Add the first number and the second number": "Die erste und die zweite Zahl hinzufügen",
"Subtract the first number from the second number": "Die erste Zahl von der zweiten Zahl abziehen",
"Multiply first number by the second number": "Die erste Zahl mit der zweiten Zahl multiplizieren",
"Divide first number by the second number": "Erste Zahl durch die zweite Zahl teilen",
"Get the remainder of the first number divided by second number": "Erhalte den Rest der ersten Zahl geteilt durch die zweite Zahl",
"Generate random number between two numbers (inclusive)": "Generiere zufällige Zahl zwischen zwei Zahlen (inklusive)",
"First Number": "Erste Nummer",
"Second Number": "Zweite Nummer"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nRealizar operaciones matemáticas.\n",
"Addition": "Adicional",
"Subtraction": "Sustracción",
"Multiplication": "Multiplicación",
"Division": "División",
"Modulo": "Modulo",
"Generate Random Number": "Generar número aleatorio",
"Add the first number and the second number": "Añadir el primer número y el segundo número",
"Subtract the first number from the second number": "Resta el primer número del segundo número",
"Multiply first number by the second number": "Multiplica el primer número por el segundo número",
"Divide first number by the second number": "Dividir el primer número entre el segundo número",
"Get the remainder of the first number divided by second number": "Obtén el resto del primer número dividido por segundo número",
"Generate random number between two numbers (inclusive)": "Generar número aleatorio entre dos números (inclusive)",
"First Number": "Primer número",
"Second Number": "Segundo número"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nEffectuer des opérations mathématiques.\n",
"Addition": "Ajouter",
"Subtraction": "Soustraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Générer un nombre aléatoire",
"Add the first number and the second number": "Ajouter le premier numéro et le deuxième numéro",
"Subtract the first number from the second number": "Soustraire le premier numéro du deuxième numéro",
"Multiply first number by the second number": "Multiplier le premier nombre par le deuxième nombre",
"Divide first number by the second number": "Diviser le premier nombre par le deuxième nombre",
"Get the remainder of the first number divided by second number": "Obtenir le reste du premier nombre divisé par le deuxième nombre",
"Generate random number between two numbers (inclusive)": "Générer un nombre aléatoire entre deux nombres (inclus)",
"First Number": "Premier nombre",
"Second Number": "Deuxième numéro"
}

View File

@@ -0,0 +1,18 @@
{
"Math Helper": "Math Helper",
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,18 @@
{
"Math Helper": "Math Helper",
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\n数学演算を実行します。\n",
"Addition": "追加",
"Subtraction": "減算",
"Multiplication": "かけ算",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "乱数を生成する",
"Add the first number and the second number": "最初の数字と2番目の数字を追加",
"Subtract the first number from the second number": "2 番目の数から最初の数を引く。",
"Multiply first number by the second number": "最初の数に 2 番目の数をかけます",
"Divide first number by the second number": "最初の数を2番目の数で分割",
"Get the remainder of the first number divided by second number": "最初の数を2番目の数で割った残りの数を取得します",
"Generate random number between two numbers (inclusive)": "2 つの数字の間で乱数を生成します(含む)",
"First Number": "最初の数値",
"Second Number": "2番目の番号"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nVoer wiskundige acties uit.\n",
"Addition": "Toevoeging",
"Subtraction": "Aftrekken",
"Multiplication": "Vermenigvuldigen",
"Division": "Divisie",
"Modulo": "Modulo",
"Generate Random Number": "Willekeurig Nummer genereren",
"Add the first number and the second number": "Voeg het eerste nummer en het tweede nummer toe",
"Subtract the first number from the second number": "Trek het eerste getal af van het tweede getal",
"Multiply first number by the second number": "Vermenigvuldig het eerste getal met het tweede getal",
"Divide first number by the second number": "Deel het eerste getal door het tweede getal",
"Get the remainder of the first number divided by second number": "Krijg de rest van het eerste getal gedeeld door het tweede getal",
"Generate random number between two numbers (inclusive)": "Genereer willekeurig getal tussen twee getallen (inclusief)",
"First Number": "Eerste nummer",
"Second Number": "Tweede getal"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nRealizar operações matemáticas.\n",
"Addition": "Adição",
"Subtraction": "Subtração",
"Multiplication": "Multiplicação",
"Division": "Divisão",
"Modulo": "Modulo",
"Generate Random Number": "Gerar Número Aleatório",
"Add the first number and the second number": "Adicionar o primeiro número e o segundo número",
"Subtract the first number from the second number": "Subtraia o primeiro número do segundo número",
"Multiply first number by the second number": "Multiplique o primeiro número pelo segundo número",
"Divide first number by the second number": "Divida o primeiro número pelo segundo número",
"Get the remainder of the first number divided by second number": "Obter o resto do primeiro número dividido pelo segundo número",
"Generate random number between two numbers (inclusive)": "Gerar número aleatório entre dois números (inclusive)",
"First Number": "Primeiro número",
"Second Number": "Segundo Número"
}

View File

@@ -0,0 +1,18 @@
{
"Math Helper": "Помощник по математике",
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Добавление",
"Subtraction": "Вычитание",
"Multiplication": "Умножение",
"Division": "Дивизион",
"Modulo": "Modulo",
"Generate Random Number": "Генерировать случайный номер",
"Add the first number and the second number": "Добавить первый номер и второй номер",
"Subtract the first number from the second number": "Вычесть первое число из второго числа",
"Multiply first number by the second number": "Умножение первого числа на второе число",
"Divide first number by the second number": "Деление первого числа на второе число",
"Get the remainder of the first number divided by second number": "Получить остаток от первого числа, разделенного на второе число",
"Generate random number between two numbers (inclusive)": "Сгенерировать случайное число между двумя числами (включительно)",
"First Number": "Первый номер",
"Second Number": "Второй номер"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,18 @@
{
"Math Helper": "Math Helper",
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,17 @@
{
"\nPerform mathematical operations.\n": "\nPerform mathematical operations.\n",
"Addition": "Addition",
"Subtraction": "Subtraction",
"Multiplication": "Multiplication",
"Division": "Division",
"Modulo": "Modulo",
"Generate Random Number": "Generate Random Number",
"Add the first number and the second number": "Add the first number and the second number",
"Subtract the first number from the second number": "Subtract the first number from the second number",
"Multiply first number by the second number": "Multiply first number by the second number",
"Divide first number by the second number": "Divide first number by the second number",
"Get the remainder of the first number divided by second number": "Get the remainder of the first number divided by second number",
"Generate random number between two numbers (inclusive)": "Generate random number between two numbers (inclusive)",
"First Number": "First Number",
"Second Number": "Second Number"
}

View File

@@ -0,0 +1,31 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/shared';
import { addition } from './lib/actions/addition';
import { division } from './lib/actions/division';
import { generateRandom } from './lib/actions/generateRandom';
import { modulo } from './lib/actions/modulo';
import { multiplication } from './lib/actions/multiplication';
import { subtraction } from './lib/actions/subtraction';
const markdownDescription = `
Perform mathematical operations.
`;
export const math = createPiece({
displayName: 'Math Helper',
description: markdownDescription,
auth: PieceAuth.None(),
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/math-helper.svg',
categories: [PieceCategory.CORE],
authors: ["kishanprmr","MoShizzle","abuaboud"],
actions: [
addition,
subtraction,
multiplication,
division,
modulo,
generateRandom,
],
triggers: [],
});

View File

@@ -0,0 +1,37 @@
import {
createAction,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
export const addition = createAction({
name: 'addition_math',
auth: PieceAuth.None(),
displayName: 'Addition',
description: 'Add the first number and the second number',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
return (
context.propsValue['first_number'] + context.propsValue['second_number']
);
},
});

View File

@@ -0,0 +1,44 @@
import {
createAction,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
import { z } from 'zod';
import { propsValidation } from '@activepieces/pieces-common';
export const division = createAction({
name: 'division_math',
auth: PieceAuth.None(),
displayName: 'Division',
description: 'Divide first number by the second number',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
await propsValidation.validateZod(context.propsValue, {
second_number: z.number().refine(val => val !== 0, {
message: "Second number cannot be zero"
}),
});
return (
context.propsValue['first_number'] / context.propsValue['second_number']
);
},
});

View File

@@ -0,0 +1,37 @@
import {
PieceAuth,
Property,
createAction,
} from '@activepieces/pieces-framework';
export const generateRandom = createAction({
name: 'generateRandom_math',
auth: PieceAuth.None(),
displayName: 'Generate Random Number',
description: 'Generate random number between two numbers (inclusive)',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
const min = context.propsValue['first_number'];
const max = context.propsValue['second_number'];
return Math.floor(Math.random() * (max - min + 1) + min);
},
});

View File

@@ -0,0 +1,37 @@
import {
createAction,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
export const modulo = createAction({
name: 'modulo_math',
auth: PieceAuth.None(),
displayName: 'Modulo',
description: 'Get the remainder of the first number divided by second number',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
return (
context.propsValue['first_number'] % context.propsValue['second_number']
);
},
});

View File

@@ -0,0 +1,37 @@
import {
PieceAuth,
Property,
createAction,
} from '@activepieces/pieces-framework';
export const multiplication = createAction({
name: 'multiplication_math',
auth: PieceAuth.None(),
displayName: 'Multiplication',
description: 'Multiply first number by the second number',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
return (
context.propsValue['first_number'] * context.propsValue['second_number']
);
},
});

View File

@@ -0,0 +1,37 @@
import {
createAction,
PieceAuth,
Property,
} from '@activepieces/pieces-framework';
export const subtraction = createAction({
name: 'subtraction_math',
auth: PieceAuth.None(),
displayName: 'Subtraction',
description: 'Subtract the first number from the second number',
errorHandlingOptions: {
continueOnFailure: {
hide: true,
},
retryOnFailure: {
hide: true,
},
},
props: {
first_number: Property.Number({
displayName: 'First Number',
description: undefined,
required: true,
}),
second_number: Property.Number({
displayName: 'Second Number',
description: undefined,
required: true,
}),
},
async run(context) {
return (
context.propsValue['second_number'] - context.propsValue['first_number']
);
},
});

View File

@@ -0,0 +1,19 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": 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"]
}