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-segment
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-segment` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-segment",
|
||||
"version": "0.0.7"
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-segment",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/segment/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/segment",
|
||||
"tsConfig": "packages/pieces/community/segment/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/segment/package.json",
|
||||
"main": "packages/pieces/community/segment/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/segment/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/segment/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-segment {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/segment",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Kopieren und fügen Sie Ihren analytischen Schreibschlüssel hier ein",
|
||||
"Identify User": "Benutzer identifizieren",
|
||||
"User ID": "Benutzer-ID",
|
||||
"Traits": "Merkmale",
|
||||
"The traits to associate with the user": "Die Merkmale, die dem Benutzer zugeordnet werden sollen"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Copia y pega tu clave de escritura analítica aquí",
|
||||
"Identify User": "Identificar usuario",
|
||||
"User ID": "ID Usuario",
|
||||
"Traits": "Rasgos",
|
||||
"The traits to associate with the user": "Los rasgos a asociar con el usuario"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Copiez et collez votre clé d'écriture d'analyse ici",
|
||||
"Identify User": "Identifier l'utilisateur",
|
||||
"User ID": "Identifiant de l'utilisateur",
|
||||
"Traits": "Caractéristiques",
|
||||
"The traits to associate with the user": "Les traits à associer à l'utilisateur"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "アナリティクスの書き込みキーをここにコピー&ペーストします",
|
||||
"Identify User": "ユーザーを識別する",
|
||||
"User ID": "ユーザー ID",
|
||||
"Traits": "形質:",
|
||||
"The traits to associate with the user": "ユーザーに関連付ける特性"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Kopieer en plak uw analytics schrijf hier de sleutel",
|
||||
"Identify User": "Identificeer gebruiker",
|
||||
"User ID": "Gebruiker ID",
|
||||
"Traits": "Eigenschappen",
|
||||
"The traits to associate with the user": "De eigenschappen om te associëren met de gebruiker"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Copie e cole a chave de escrita do seu analytics aqui",
|
||||
"Identify User": "Identificar Usuário",
|
||||
"User ID": "ID de usuário",
|
||||
"Traits": "Traços",
|
||||
"The traits to associate with the user": "Os traços para associar com o usuário"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Segment": "Сегмент",
|
||||
"Copy and paste your analytics write key here": "Скопируйте и вставьте ваш аналитический ключ для записи здесь",
|
||||
"Identify User": "Идентификация пользователя",
|
||||
"User ID": "ID пользователя",
|
||||
"Traits": "Черты",
|
||||
"The traits to associate with the user": "Характеристики, связанные с пользователем"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Copy and paste your analytics write key here",
|
||||
"Identify User": "Identify User",
|
||||
"User ID": "User ID",
|
||||
"Traits": "Traits",
|
||||
"The traits to associate with the user": "The traits to associate with the user"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Segment": "Segment",
|
||||
"Copy and paste your analytics write key here": "Copy and paste your analytics write key here",
|
||||
"Identify User": "Identify User",
|
||||
"User ID": "User ID",
|
||||
"Traits": "Traits",
|
||||
"The traits to associate with the user": "The traits to associate with the user"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"Copy and paste your analytics write key here": "Copy and paste your analytics write key here",
|
||||
"Identify User": "Identify User",
|
||||
"User ID": "User ID",
|
||||
"Traits": "Traits",
|
||||
"The traits to associate with the user": "The traits to associate with the user"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
import { createPiece, PieceAuth } from "@activepieces/pieces-framework";
|
||||
import { identifyUser } from "./lib/actions/identify-user";
|
||||
|
||||
export const segmentAuth = PieceAuth.SecretText({
|
||||
displayName: 'Analytics Key',
|
||||
required: true,
|
||||
description: 'Copy and paste your analytics write key here',
|
||||
});
|
||||
|
||||
|
||||
export const segment = createPiece({
|
||||
displayName: "Segment",
|
||||
auth: segmentAuth,
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: "https://cdn.activepieces.com/pieces/segment.png",
|
||||
authors: ['abuaboud'],
|
||||
actions: [identifyUser],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,32 @@
|
||||
import { segmentAuth } from '../../.';
|
||||
import { Property, createAction } from '@activepieces/pieces-framework';
|
||||
import { Analytics } from '@segment/analytics-node'
|
||||
|
||||
export const identifyUser = createAction({
|
||||
name: 'identifyUser',
|
||||
displayName: 'Identify User',
|
||||
description: '',
|
||||
props: {
|
||||
userId: Property.ShortText({
|
||||
displayName: 'User ID',
|
||||
required: true,
|
||||
}),
|
||||
traits: Property.Object({
|
||||
displayName: 'Traits',
|
||||
description: 'The traits to associate with the user',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
auth: segmentAuth,
|
||||
async run(context) {
|
||||
const analytics = new Analytics({ writeKey: context.auth.secret_text })
|
||||
analytics.identify({
|
||||
userId: context.propsValue.userId,
|
||||
traits: context.propsValue.traits,
|
||||
})
|
||||
return {
|
||||
success: true,
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"]
|
||||
}
|
||||
Reference in New Issue
Block a user