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

View File

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

View File

@@ -0,0 +1,65 @@
{
"name": "pieces-mind-studio",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/pieces/community/mind-studio/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/mind-studio",
"tsConfig": "packages/pieces/community/mind-studio/tsconfig.lib.json",
"packageJson": "packages/pieces/community/mind-studio/package.json",
"main": "packages/pieces/community/mind-studio/src/index.ts",
"assets": [
"packages/pieces/community/mind-studio/*.md",
{
"input": "packages/pieces/community/mind-studio/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/mind-studio",
"command": "bun install --no-save --silent"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": [
"{options.outputFile}"
]
}
}
}

View File

@@ -0,0 +1,23 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { runWorkflowAction } from './lib/actions/run-workflow';
import { PieceCategory } from '@activepieces/shared';
export const mindStudioAuth = PieceAuth.SecretText({
displayName: 'API Key',
description: 'Your MindStudio API key (Bearer token).',
required: true,
});
export const mindStudio = createPiece({
displayName: 'MindStudio',
description: 'Run MindStudio workflows and get AI results.',
auth: mindStudioAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/mind-studio.png',
authors: ['onyedikachi-david'],
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE],
actions: [runWorkflowAction],
triggers: [],
});

View File

@@ -0,0 +1,73 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { HttpMethod, httpClient, HttpRequest } from '@activepieces/pieces-common';
import { mindStudioAuth } from '../..';
export const runWorkflowAction = createAction({
auth: mindStudioAuth,
name: 'run_workflow',
displayName: 'Run Workflow',
description: 'Run a workflow from your MindStudio app and start a thread.',
props: {
appId: Property.ShortText({
displayName: 'App ID',
description: 'MindStudio app ID to run.',
required: true,
}),
workflow: Property.ShortText({
displayName: 'Workflow',
description: 'Workflow name to run (without the .flow extension).',
required: false,
}),
variables: Property.Json({
displayName: 'Variables',
description: 'Key-value variables passed to the app.',
required: false,
defaultValue: {},
}),
callbackUrl: Property.ShortText({
displayName: 'Callback URL',
description: 'URL to receive the execution result asynchronously.',
required: false,
}),
includeBillingCost: Property.Checkbox({
displayName: 'Include Billing Cost',
description: 'Return the billing cost in the response.',
required: false,
defaultValue: false,
}),
},
async run({ auth, propsValue }) {
const body: Record<string, unknown> = {
appId: propsValue.appId,
};
if (propsValue.workflow) {
body['workflow'] = propsValue.workflow;
}
if (propsValue.variables) {
body['variables'] = propsValue.variables;
}
if (propsValue.callbackUrl) {
body['callbackUrl'] = propsValue.callbackUrl;
}
if (propsValue.includeBillingCost !== undefined) {
body['includeBillingCost'] = propsValue.includeBillingCost;
}
const request: HttpRequest = {
method: HttpMethod.POST,
url: 'https://api.mindstudio.ai/developer/v2/apps/run',
headers: {
Authorization: `Bearer ${auth.secret_text}`,
'Content-Type': 'application/json',
},
body,
};
const response = await httpClient.sendRequest(request);
return response.body;
},
});

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