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:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"extends": [
|
||||
"../../../../.eslintrc.base.json"
|
||||
],
|
||||
"ignorePatterns": [
|
||||
"!**/*"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx",
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.ts",
|
||||
"*.tsx"
|
||||
],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.js",
|
||||
"*.jsx"
|
||||
],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-luxury-presence
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-luxury-presence` to build the library.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@activepieces/piece-luxury-presence",
|
||||
"version": "0.0.1",
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-luxury-presence",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/luxury-presence/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/luxury-presence",
|
||||
"tsConfig": "packages/pieces/community/luxury-presence/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/luxury-presence/package.json",
|
||||
"main": "packages/pieces/community/luxury-presence/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/luxury-presence/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/luxury-presence/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/luxury-presence",
|
||||
"command": "bun install --no-save --silent"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
||||
import { newLead } from './lib/triggers/new-lead';
|
||||
import { luxuryPresenceAuth } from './lib/common/auth';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
|
||||
export const luxuryPresence = createPiece({
|
||||
displayName: 'Luxury Presence',
|
||||
auth: luxuryPresenceAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/luxury-presence.png',
|
||||
description:
|
||||
'Luxury Presence is a software company designed for real estate agents. Their all-in-one platform combines a CRM, website builder, marketing tools, and more to help agents grow their business and close more deals.',
|
||||
categories: [PieceCategory.SALES_AND_CRM],
|
||||
authors: ['sanket-a11y'],
|
||||
actions: [],
|
||||
triggers: [newLead],
|
||||
});
|
||||
@@ -0,0 +1,19 @@
|
||||
import { PieceAuth } from '@activepieces/pieces-framework';
|
||||
|
||||
export const luxuryPresenceAuth = PieceAuth.SecretText({
|
||||
displayName: 'API Key',
|
||||
description: `Generating and Managing API Keys
|
||||
|
||||
API Keys can be generated via the dashboard located here, or by following these steps:
|
||||
|
||||
1. Login to your Luxury Presence account: app.luxurypresence.com.
|
||||
2. Click on your profile icon in the bottom left-hand corner.
|
||||
3. Navigate to Settings > API Keys > Generate Key.
|
||||
4. Type in a Key Description for your API key to help easily recognize it later.
|
||||
5. Click Generate Key.
|
||||
6. Copy your API Key, and store it in a safe place.
|
||||
|
||||
You must have the role of admin in your account to be able to manage API Keys.
|
||||
`,
|
||||
required: true,
|
||||
});
|
||||
@@ -0,0 +1,64 @@
|
||||
import { createTrigger, TriggerStrategy } from '@activepieces/pieces-framework';
|
||||
import { luxuryPresenceAuth } from '../common/auth';
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
const LUXURY_PRESENCE_API_BASE = 'https://api.luxurypresence.com/crm/v1';
|
||||
|
||||
export const newLead = createTrigger({
|
||||
auth: luxuryPresenceAuth,
|
||||
name: 'newLead',
|
||||
displayName: 'New Lead',
|
||||
description: '',
|
||||
props: {},
|
||||
sampleData: {},
|
||||
type: TriggerStrategy.WEBHOOK,
|
||||
async onEnable(context) {
|
||||
const apiKey = context.auth.secret_text;
|
||||
|
||||
const url = `${LUXURY_PRESENCE_API_BASE}/webhooks`;
|
||||
|
||||
const resp = await httpClient.sendRequest({
|
||||
method: HttpMethod.POST,
|
||||
url,
|
||||
headers: {
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: {
|
||||
name: 'ActivePieces New Lead Webhook',
|
||||
url: context.webhookUrl,
|
||||
events: ['leads'],
|
||||
},
|
||||
});
|
||||
|
||||
const body = await resp.body;
|
||||
|
||||
await context.store.put('webhook_id', body.id);
|
||||
},
|
||||
async onDisable(context) {
|
||||
const apiKey = context.auth.secret_text;
|
||||
|
||||
const webhookId = (await context.store.get('webhook_id')) as string | null;
|
||||
|
||||
if (webhookId) {
|
||||
const deleteUrl = `${LUXURY_PRESENCE_API_BASE}/webhooks/${encodeURIComponent(
|
||||
webhookId
|
||||
)}`;
|
||||
await httpClient.sendRequest({
|
||||
method: HttpMethod.DELETE,
|
||||
url: deleteUrl,
|
||||
headers: {
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
}
|
||||
await context.store.delete('webhook_id');
|
||||
},
|
||||
async run(context) {
|
||||
const payload = context.payload.body as any;
|
||||
if (payload.eventName !== 'leads') {
|
||||
return [];
|
||||
}
|
||||
return [context.payload.body];
|
||||
},
|
||||
});
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user