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

View File

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

View File

@@ -0,0 +1,10 @@
{
"name": "@activepieces/piece-gptzero-detect-ai",
"version": "0.0.2",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

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

View File

@@ -0,0 +1,17 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { scanFile } from './lib/actions/scan-file';
import { scanText } from './lib/actions/scan-text';
import { PieceCategory } from '@activepieces/shared';
import { gptzeroDetectAiAuth } from './lib/common/auth';
export const gptzeroDetectAi = createPiece({
displayName: 'GPTZero',
auth: gptzeroDetectAiAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/gptzero-detect-ai.png',
authors: ['sanket-a11y'],
description: 'Detect AI-generated text with GPTZero API',
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE],
actions: [scanFile, scanText],
triggers: [],
});

View File

@@ -0,0 +1,39 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
import { gptzeroDetectAiAuth } from '../common/auth';
export const scanFile = createAction({
auth: gptzeroDetectAiAuth,
name: 'scanFile',
displayName: 'Scan File',
description: 'Scan a file for AI-generated content detection',
props: {
file: Property.File({
displayName: 'File',
description: 'The file to scan for AI-generated content',
required: true,
}),
},
async run(context) {
const file = context.propsValue.file;
const formData = new FormData();
const fileBuffer = Buffer.from(file.base64, 'base64');
const mimeType = file.extension
? `application/${file.extension}`
: 'application/octet-stream';
const blob = new Blob([fileBuffer], { type: mimeType });
formData.append('files', blob, file.filename);
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: 'https://api.gptzero.me/v2/predict/files',
headers: {
'x-api-key': context.auth.secret_text,
},
body: formData,
});
return response.body;
},
});

View File

@@ -0,0 +1,34 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
import { gptzeroDetectAiAuth } from '../common/auth';
export const scanText = createAction({
auth: gptzeroDetectAiAuth,
name: 'scanText',
displayName: 'Scan Text',
description: 'Scan text content for AI-generated content detection',
props: {
text: Property.LongText({
displayName: 'Text',
description: 'The text content to scan for AI-generated content',
required: true,
}),
},
async run(context) {
const payload = {
document: context.propsValue.text,
};
const response = await httpClient.sendRequest({
method: HttpMethod.POST,
url: 'https://api.gptzero.me/v2/predict/text',
headers: {
'x-api-key': context.auth.secret_text,
'content-type': 'application/json',
},
body: payload,
});
return response.body;
},
});

View File

@@ -0,0 +1,7 @@
import { PieceAuth } from '@activepieces/pieces-framework';
export const gptzeroDetectAiAuth = PieceAuth.SecretText({
displayName: 'GPTZero API Key',
description: 'https://app.gptzero.me/app/api to get your API key',
required: true,
});

View File

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

View File

@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"]
}