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

View File

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

View File

@@ -0,0 +1,22 @@
{
"Chatbot ID": "Chatbot ID",
"API key": "API key",
"The Chatbot ID is available on the [main dashboard of Denser Chatbot](https://denser.ai/u/chatbots). Simply choose the ID of the chatbot you want": "The Chatbot ID is available on the [main dashboard of Denser Chatbot](https://denser.ai/u/chatbots). Simply choose the ID of the chatbot you want",
"Process input text": "Process input text",
"Input text processed by the chatbot": "Input text processed by the chatbot",
"Question": "Question",
"Prompt": "Prompt",
"Model": "Model",
"Citations": "Citations",
"The question to be processed by the chatbot": "The question to be processed by the chatbot",
"The prompt to be used by the chatbot e.g., \"Please provide your answer in the following format: ...\"": "The prompt to be used by the chatbot e.g., \"Please provide your answer in the following format: ...\"",
"The model to be used by the chatbot (e.g., gpt-3.5, gpt-4)": "The model to be used by the chatbot (e.g., gpt-3.5, gpt-4)",
"Whether to include citations in the response": "Whether to include citations in the response",
"gpt-3.5": "gpt-3.5",
"gpt-4o-mini": "gpt-4o-mini",
"gpt-4": "gpt-4",
"gpt-4o": "gpt-4o",
"claude-3-5-sonnet": "claude-3-5-sonnet",
"claude-3-5-haiku": "claude-3-5-haiku",
"claude-3-7-sonnet": "claude-3-7-sonnet"
}

View File

@@ -0,0 +1,15 @@
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
import { denserAiAuth } from './lib/common/auth';
import { PieceCategory } from '@activepieces/shared';
import { processInputText } from './lib/actions/process-input-text';
export const denserAi = createPiece({
displayName: 'Denser.ai',
auth: denserAiAuth,
minimumSupportedRelease: '0.36.1',
logoUrl: 'https://cdn.activepieces.com/pieces/denser-ai.png',
categories: [PieceCategory.ARTIFICIAL_INTELLIGENCE],
authors: ['sanket-a11y'],
actions: [processInputText],
triggers: [],
});

View File

@@ -0,0 +1,60 @@
import { createAction, Property } from '@activepieces/pieces-framework';
import { denserAiAuth } from '../common/auth';
import { makeRequest } from '../common/client';
import { HttpMethod } from '@activepieces/pieces-common';
export const processInputText = createAction({
auth: denserAiAuth,
name: 'processInputText',
displayName: 'Process input text',
description: 'Input text processed by the chatbot',
props: {
question: Property.LongText({
displayName: 'Question',
description: 'The question to be processed by the chatbot',
required: true,
}),
prompt: Property.LongText({
displayName: 'Prompt',
description:
'The prompt to be used by the chatbot e.g., "Please provide your answer in the following format: ..."',
required: false,
}),
model: Property.StaticDropdown({
displayName: 'Model',
description: 'The model to be used by the chatbot (e.g., gpt-3.5, gpt-4)',
required: false,
options: {
options: [
{ label: 'gpt-3.5', value: 'gpt-3.5' },
{ label: 'gpt-4o-mini', value: 'gpt-4o-mini' },
{ label: 'gpt-4', value: 'gpt-4' },
{ label: 'gpt-4o', value: 'gpt-4o' },
{ label: 'claude-3-5-sonnet', value: 'claude-3-5-sonnet' },
{ label: 'claude-3-5-haiku', value: 'claude-3-5-haiku' },
{ label: 'claude-3-7-sonnet', value: 'claude-3-7-sonnet' },
],
},
defaultValue: ' gpt-4o-mini',
}),
citation: Property.Checkbox({
displayName: 'Citations',
description: 'Whether to include citations in the response',
required: false,
defaultValue: false,
}),
},
async run(context) {
const { question, prompt, model, citation } = context.propsValue;
const { apiKey, chatbotId } = context.auth.props;
const response = await makeRequest(HttpMethod.POST, `/query`, {
question,
prompt,
model,
citation,
key: apiKey,
chatbotId: chatbotId,
});
return response;
},
});

View File

@@ -0,0 +1,18 @@
import { PieceAuth, Property } from '@activepieces/pieces-framework';
export const denserAiAuth = PieceAuth.CustomAuth({
props: {
chatbotId: Property.ShortText({
displayName: 'Chatbot ID',
description:
'The Chatbot ID is available on the [main dashboard of Denser Chatbot](https://denser.ai/u/chatbots). Simply choose the ID of the chatbot you want',
required: true,
}),
apiKey: Property.ShortText({
displayName: 'API key',
description: '',
required: true,
}),
},
required: true,
});

View File

@@ -0,0 +1,23 @@
import { HttpMethod, httpClient } from '@activepieces/pieces-common';
export const BASE_URL = `https://denser.ai/api`;
export async function makeRequest(
method: HttpMethod,
path: string,
body?: unknown
) {
try {
const response = await httpClient.sendRequest({
method,
url: `${BASE_URL}${path}`,
headers: {
'Content-Type': 'application/json',
},
body,
});
return response.body;
} catch (error: any) {
throw new Error(`Unexpected error: ${error.message || String(error)}`);
}
}

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