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

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
{
"API key": "API-Schlüssel",
"Remove background": "Hintergrund entfernen",
"Remove the background of the image given as input": "Den Hintergrund des Bildes als Eingabe entfernen",
"Image file": "Bilddatei",
"Generated filename": "Generierter Dateiname"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "Clave API",
"Remove background": "Eliminar fondo",
"Remove the background of the image given as input": "Remueve el fondo de la imagen dada como entrada",
"Image file": "Archivo de imagen",
"Generated filename": "Nombre de archivo generado"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "Clé API",
"Remove background": "Supprimer l'arrière-plan",
"Remove the background of the image given as input": "Supprime l'arrière-plan de l'image donnée en entrée",
"Image file": "Fichier image",
"Generated filename": "Nom de fichier généré"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "API キー",
"Remove background": "背景を削除",
"Remove the background of the image given as input": "入力として与えられた画像の背景を削除",
"Image file": "画像ファイル",
"Generated filename": "生成されたファイル名"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "API sleutel",
"Remove background": "Achtergrond verwijderen",
"Remove the background of the image given as input": "Verwijder de achtergrond van de gegeven afbeelding als invoer",
"Image file": "Afbeelding bestand",
"Generated filename": "Gegenereerde bestandsnaam"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "Chave da API",
"Remove background": "Remover fundo",
"Remove the background of the image given as input": "Remove o fundo da imagem dada como entrada",
"Image file": "Arquivo de imagem",
"Generated filename": "Nome de arquivo gerado"
}

View File

@@ -0,0 +1,8 @@
{
"Photoroom": "Фотография",
"API key": "API ключ",
"Remove background": "Удалить фон",
"Remove the background of the image given as input": "Удалить фон изображения, заданный как ввод",
"Image file": "Файл изображения",
"Generated filename": "Сгенерированное имя файла"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "API key",
"Remove background": "Remove background",
"Remove the background of the image given as input": "Remove the background of the image given as input",
"Image file": "Image file",
"Generated filename": "Generated filename"
}

View File

@@ -0,0 +1,8 @@
{
"Photoroom": "Photoroom",
"API key": "API key",
"Remove background": "Remove background",
"Remove the background of the image given as input": "Remove the background of the image given as input",
"Image file": "Image file",
"Generated filename": "Generated filename"
}

View File

@@ -0,0 +1,7 @@
{
"API key": "API key",
"Remove background": "Remove background",
"Remove the background of the image given as input": "Remove the background of the image given as input",
"Image file": "Image file",
"Generated filename": "Generated filename"
}

View File

@@ -0,0 +1,22 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { removeBackground } from './lib/actions/remove-background';
export const photoroomAuth = PieceAuth.CustomAuth({
required: true,
props: {
apiKey: PieceAuth.SecretText({
displayName: 'API key',
required: true,
}),
},
});
export const photoroom = createPiece({
displayName: 'Photoroom',
auth: photoroomAuth,
minimumSupportedRelease: '0.30.0',
logoUrl: 'https://cdn.activepieces.com/pieces/photoroom.png',
authors: ['AdamSelene', 'Charles-Go'],
actions: [removeBackground],
triggers: [],
});

View File

@@ -0,0 +1,38 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { photoroomAuth } from '../..';
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
export const removeBackground = createAction({
name: 'removeBackground',
displayName: 'Remove background',
description: 'Remove the background of the image given as input',
auth: photoroomAuth,
props: {
file: Property.File({ displayName: 'Image file', required: true }),
filename: Property.ShortText({
displayName: 'Generated filename',
required: true,
}),
},
async run({ auth, propsValue, files }) {
const form = new FormData();
form.append('image_file', new Blob([propsValue.file.data as any]));
const response = await httpClient.sendRequest({
url: `https://sdk.photoroom.com/v1/segment`,
method: HttpMethod.POST,
headers: {
'x-api-key': auth.props.apiKey,
'Content-Type': 'multipart/form-data',
},
body: form,
});
const imageUrl = await files.write({
fileName: propsValue.filename,
data: Buffer.from(response.body.result_b64, 'base64'),
});
return {
fileName: propsValue.filename,
url: imageUrl,
};
},
});

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