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,18 @@
|
||||
{
|
||||
"extends": ["../../../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
# pieces-soap
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-soap` to build the library.
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@activepieces/piece-soap",
|
||||
"version": "0.0.11",
|
||||
"dependencies": {
|
||||
"soap": "1.1.10"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "pieces-soap",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/soap/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/soap",
|
||||
"tsConfig": "packages/pieces/community/soap/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/soap/package.json",
|
||||
"main": "packages/pieces/community/soap/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/soap/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/soap/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"publish": {
|
||||
"command": "node tools/scripts/publish.mjs pieces-soap {args.ver} {args.tag}",
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/soap",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Einfaches Object Access Protokoll für die Kommunikation zwischen Anwendungen",
|
||||
"Authentication Type": "Authentifizierungstyp",
|
||||
"Username": "Benutzername",
|
||||
"Password": "Kennwort",
|
||||
"Custom Header": "Eigene Kopfzeile",
|
||||
"The WS Security username": "Der WS-Sicherheits-Benutzername",
|
||||
"The WS Security password": "Das WS-Sicherheitspasswort",
|
||||
"Custom Header Content": "Eigener Kopfzeileninhalt",
|
||||
"None": "Keine",
|
||||
"WS Security": "WS-Sicherheit",
|
||||
"Basic Auth": "Einfacher Auth",
|
||||
"Call SOAP Method": "SOAP-Methode aufrufen",
|
||||
"Call a SOAP from a given wsdl specification": "SOAP aus einer gegebenen wsdl-Spezifikation aufrufen",
|
||||
"WSDL URL": "WSDL-URL",
|
||||
"Method": "Methode",
|
||||
"Parameters": "Parameter",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "Die SOAP-Methode",
|
||||
"Arguments for the SOAP method": "Argumente für die SOAP-Methode"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Protocolo simple de acceso a objetos para la comunicación entre aplicaciones",
|
||||
"Authentication Type": "Tipo de autenticación",
|
||||
"Username": "Usuario",
|
||||
"Password": "Contraseña",
|
||||
"Custom Header": "Cabecera personalizada",
|
||||
"The WS Security username": "El nombre de usuario WS Security",
|
||||
"The WS Security password": "Contraseña de seguridad WS",
|
||||
"Custom Header Content": "Contenido de cabecera personalizado",
|
||||
"None": "Ninguna",
|
||||
"WS Security": "Seguridad WS",
|
||||
"Basic Auth": "Auth Básica",
|
||||
"Call SOAP Method": "Llamar al método SOAP",
|
||||
"Call a SOAP from a given wsdl specification": "Llamar a un SOAP desde una especificación determinada de wsdl",
|
||||
"WSDL URL": "URL de WSDL",
|
||||
"Method": "Método",
|
||||
"Parameters": "Parámetros",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "El método SOAP",
|
||||
"Arguments for the SOAP method": "Argumentos para el método SOAP"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Protocole d'accès à l'objet simple pour la communication entre applications",
|
||||
"Authentication Type": "Type d'authentification",
|
||||
"Username": "Nom d'utilisateur",
|
||||
"Password": "Password",
|
||||
"Custom Header": "En-tête personnalisé",
|
||||
"The WS Security username": "Le nom d'utilisateur WS Security",
|
||||
"The WS Security password": "Le mot de passe WS Security",
|
||||
"Custom Header Content": "Contenu de l'en-tête personnalisé",
|
||||
"None": "Aucun",
|
||||
"WS Security": "Sécurité WS",
|
||||
"Basic Auth": "Authentification basique",
|
||||
"Call SOAP Method": "Appeler la méthode SOAP",
|
||||
"Call a SOAP from a given wsdl specification": "Appeler un SOAP à partir d'une spécification wsdl donnée",
|
||||
"WSDL URL": "URL WSDL",
|
||||
"Method": "Méthode",
|
||||
"Parameters": "Paramètres",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "La méthode SOAP",
|
||||
"Arguments for the SOAP method": "Arguments pour la méthode SOAP"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "アプリケーション間の通信のためのシンプルなオブジェクトアクセスプロトコル",
|
||||
"Authentication Type": "認証タイプ",
|
||||
"Username": "ユーザー名",
|
||||
"Password": "Password",
|
||||
"Custom Header": "カスタムヘッダー",
|
||||
"The WS Security username": "WSセキュリティユーザー名",
|
||||
"The WS Security password": "WSセキュリティパスワード",
|
||||
"Custom Header Content": "カスタムヘッダーコンテンツ",
|
||||
"None": "なし",
|
||||
"WS Security": "WSセキュリティ",
|
||||
"Basic Auth": "ベーシック認証",
|
||||
"Call SOAP Method": "SOAP メソッドを呼び出します。",
|
||||
"Call a SOAP from a given wsdl specification": "指定した wsdl 仕様から SOAP を呼び出します。",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "方法",
|
||||
"Parameters": "パラメータ",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "SOAP メソッド",
|
||||
"Arguments for the SOAP method": "SOAP メソッドの引数"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Simpele Object Access Protocol voor communicatie tussen toepassingen",
|
||||
"Authentication Type": "Authenticatie type",
|
||||
"Username": "Gebruikersnaam",
|
||||
"Password": "Wachtwoord",
|
||||
"Custom Header": "Aangepaste koptekst",
|
||||
"The WS Security username": "De WS Security gebruikersnaam",
|
||||
"The WS Security password": "Het WS Security wachtwoord",
|
||||
"Custom Header Content": "Aangepaste header inhoud",
|
||||
"None": "geen",
|
||||
"WS Security": "WS Beveiliging",
|
||||
"Basic Auth": "Basis authenticatie",
|
||||
"Call SOAP Method": "Bel SOAP methode",
|
||||
"Call a SOAP from a given wsdl specification": "Bel een SOAP aan van een gegeven wsdl specificatie",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "Methode",
|
||||
"Parameters": "Parameters",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "De SOAP Methode",
|
||||
"Arguments for the SOAP method": "Argumenten voor de SOAP methode"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Protocolo de Acesso ao Objeto simples para a comunicação entre aplicações",
|
||||
"Authentication Type": "Tipo de autenticação",
|
||||
"Username": "Usuário:",
|
||||
"Password": "Senha",
|
||||
"Custom Header": "Cabeçalho personalizado",
|
||||
"The WS Security username": "O nome de usuário de segurança WS",
|
||||
"The WS Security password": "A senha de segurança WS",
|
||||
"Custom Header Content": "Conteúdo de cabeçalho personalizado",
|
||||
"None": "Nenhuma",
|
||||
"WS Security": "Segurança WS",
|
||||
"Basic Auth": "Autenticação básica",
|
||||
"Call SOAP Method": "Chamar método SOAP",
|
||||
"Call a SOAP from a given wsdl specification": "Chamar um SOAP de uma especificação do wsdl",
|
||||
"WSDL URL": "URL do WSDL",
|
||||
"Method": "Método",
|
||||
"Parameters": "Parâmetros",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "O método SOAP",
|
||||
"Arguments for the SOAP method": "Argumentos para o método SOAP"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"SOAP": "СОАР",
|
||||
"Simple Object Access Protocol for communication between applications": "Простой протокол доступа к объектам для связи между приложениями",
|
||||
"Authentication Type": "Тип аутентификации",
|
||||
"Username": "Имя пользователя",
|
||||
"Password": "Пароль",
|
||||
"Custom Header": "Пользовательский заголовок",
|
||||
"The WS Security username": "Имя пользователя The WS Security",
|
||||
"The WS Security password": "Пароль безопасности WS",
|
||||
"Custom Header Content": "Пользовательское содержимое заголовка",
|
||||
"None": "Нет",
|
||||
"WS Security": "Безопасность WS",
|
||||
"Basic Auth": "Базовая авторизация",
|
||||
"Call SOAP Method": "Метод вызова SOAP",
|
||||
"Call a SOAP from a given wsdl specification": "Вызвать SOAP из данной спецификации wsdl",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "Метод",
|
||||
"Parameters": "Параметры",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "Метод SOAP",
|
||||
"Arguments for the SOAP method": "Аргументы метода SOAP"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Simple Object Access Protocol for communication between applications",
|
||||
"Authentication Type": "Authentication Type",
|
||||
"Username": "Username",
|
||||
"Password": "Password",
|
||||
"Custom Header": "Custom Header",
|
||||
"The WS Security username": "The WS Security username",
|
||||
"The WS Security password": "The WS Security password",
|
||||
"Custom Header Content": "Custom Header Content",
|
||||
"None": "None",
|
||||
"WS Security": "WS Security",
|
||||
"Basic Auth": "Basic Auth",
|
||||
"Call SOAP Method": "Call SOAP Method",
|
||||
"Call a SOAP from a given wsdl specification": "Call a SOAP from a given wsdl specification",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "Method",
|
||||
"Parameters": "Parameters",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "The SOAP Method",
|
||||
"Arguments for the SOAP method": "Arguments for the SOAP method"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"SOAP": "SOAP",
|
||||
"Simple Object Access Protocol for communication between applications": "Simple Object Access Protocol for communication between applications",
|
||||
"Authentication Type": "Authentication Type",
|
||||
"Username": "Username",
|
||||
"Password": "Password",
|
||||
"Custom Header": "Custom Header",
|
||||
"The WS Security username": "The WS Security username",
|
||||
"The WS Security password": "The WS Security password",
|
||||
"Custom Header Content": "Custom Header Content",
|
||||
"None": "None",
|
||||
"WS Security": "WS Security",
|
||||
"Basic Auth": "Basic Auth",
|
||||
"Call SOAP Method": "Call SOAP Method",
|
||||
"Call a SOAP from a given wsdl specification": "Call a SOAP from a given wsdl specification",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "Method",
|
||||
"Parameters": "Parameters",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "The SOAP Method",
|
||||
"Arguments for the SOAP method": "Arguments for the SOAP method"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Simple Object Access Protocol for communication between applications": "Simple Object Access Protocol for communication between applications",
|
||||
"Authentication Type": "Authentication Type",
|
||||
"Username": "用户名",
|
||||
"Password": "密码",
|
||||
"Custom Header": "Custom Header",
|
||||
"The WS Security username": "The WS Security username",
|
||||
"The WS Security password": "The WS Security password",
|
||||
"Custom Header Content": "Custom Header Content",
|
||||
"None": "无",
|
||||
"WS Security": "WS Security",
|
||||
"Basic Auth": "基本认证",
|
||||
"Call SOAP Method": "Call SOAP Method",
|
||||
"Call a SOAP from a given wsdl specification": "Call a SOAP from a given wsdl specification",
|
||||
"WSDL URL": "WSDL URL",
|
||||
"Method": "方法",
|
||||
"Parameters": "Parameters",
|
||||
"Parsed": "Parsed",
|
||||
"The SOAP Method": "The SOAP Method",
|
||||
"Arguments for the SOAP method": "Arguments for the SOAP method"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createPiece } from '@activepieces/pieces-framework';
|
||||
import { callMethod } from './lib/actions/call-method';
|
||||
import { soapAuth } from './lib/shared/auth';
|
||||
|
||||
export const soap = createPiece({
|
||||
displayName: 'SOAP',
|
||||
description:
|
||||
'Simple Object Access Protocol for communication between applications',
|
||||
|
||||
auth: soapAuth(),
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/soap.png',
|
||||
authors: ["x7airworker","kishanprmr","abuaboud"],
|
||||
categories: [],
|
||||
actions: [callMethod],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,146 @@
|
||||
import * as soap from 'soap';
|
||||
import {
|
||||
CustomAuthProps,
|
||||
Property,
|
||||
ShortTextProperty,
|
||||
StaticDropdownProperty,
|
||||
StaticMultiSelectDropdownProperty,
|
||||
StaticPropsValue,
|
||||
createAction,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { soapAuth } from '../shared/auth';
|
||||
|
||||
type DynamicProp =
|
||||
| ShortTextProperty<boolean>
|
||||
| StaticDropdownProperty<any, boolean>
|
||||
| StaticMultiSelectDropdownProperty<any, boolean>;
|
||||
|
||||
export const callMethod = createAction({
|
||||
name: 'call_method',
|
||||
displayName: 'Call SOAP Method',
|
||||
description: 'Call a SOAP from a given wsdl specification',
|
||||
auth: soapAuth(),
|
||||
props: {
|
||||
wsdl: Property.ShortText({
|
||||
displayName: 'WSDL URL',
|
||||
required: true,
|
||||
}),
|
||||
method: Property.Dropdown({
|
||||
auth: soapAuth(),
|
||||
description: 'The SOAP Method',
|
||||
displayName: 'Method',
|
||||
required: true,
|
||||
refreshers: ['wsdl'],
|
||||
options: async ({ wsdl }) => {
|
||||
if (!wsdl) {
|
||||
return {
|
||||
disabled: true,
|
||||
placeholder: 'Setup WSDL URL first',
|
||||
options: [],
|
||||
};
|
||||
}
|
||||
|
||||
const client = await soap.createClientAsync(wsdl as string);
|
||||
const spec = client.describe();
|
||||
const methods = Object.keys(
|
||||
Object.values(Object.values(spec)[0] as object)[0]
|
||||
);
|
||||
|
||||
return {
|
||||
disabled: false,
|
||||
options: methods.map((method) => {
|
||||
return {
|
||||
label: method,
|
||||
value: method,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
}),
|
||||
args: Property.DynamicProperties({
|
||||
auth: soapAuth(),
|
||||
description: 'Arguments for the SOAP method',
|
||||
displayName: 'Parameters',
|
||||
required: true,
|
||||
refreshers: ['wsdl', 'method'],
|
||||
async props({ wsdl, method }) {
|
||||
if (!wsdl || !method) {
|
||||
return {};
|
||||
}
|
||||
const client = await soap.createClientAsync(wsdl as unknown as string);
|
||||
const spec = client.describe();
|
||||
const methods = Object.values(Object.values(spec)[0] as object)[0];
|
||||
|
||||
const properties: Record<string, DynamicProp> = {};
|
||||
|
||||
for (const key in methods[method as unknown as string]['input']) {
|
||||
properties[key as string] = Property.ShortText({
|
||||
displayName: key,
|
||||
required: true,
|
||||
});
|
||||
}
|
||||
|
||||
return properties;
|
||||
},
|
||||
}),
|
||||
parsed: Property.Checkbox({
|
||||
displayName: 'Parsed',
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
}),
|
||||
},
|
||||
async run(ctx) {
|
||||
const { wsdl, method, args, parsed } = ctx.propsValue;
|
||||
|
||||
const client = await soap.createClientAsync(wsdl, {
|
||||
forceSoap12Headers: true,
|
||||
});
|
||||
|
||||
const auth = ctx.auth as StaticPropsValue<CustomAuthProps>;
|
||||
switch (auth['type']) {
|
||||
case 'WS':
|
||||
client.setSecurity(
|
||||
new soap.WSSecurity(
|
||||
auth['username'] as string,
|
||||
auth['password'] as string
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'Basic':
|
||||
client.setSecurity(
|
||||
new soap.BasicAuthSecurity(
|
||||
auth['username'] as string,
|
||||
auth['password'] as string
|
||||
)
|
||||
);
|
||||
break;
|
||||
case 'Header': // eslint-disable-next-line no-case-declarations
|
||||
client.addSoapHeader(ctx.auth.props.customHeader);
|
||||
break;
|
||||
}
|
||||
|
||||
const action = client[method + 'Async'];
|
||||
|
||||
try {
|
||||
const [actionRes] = await action(args);
|
||||
|
||||
if (parsed || false) {
|
||||
return actionRes;
|
||||
} else {
|
||||
return {
|
||||
request: client.lastRequest,
|
||||
response: client.lastResponse,
|
||||
};
|
||||
}
|
||||
} catch (e: any) {
|
||||
return {
|
||||
error: true,
|
||||
status: e.response.status,
|
||||
raw: {
|
||||
request: client.lastRequest,
|
||||
response: e.body,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,48 @@
|
||||
import { PieceAuth, Property } from '@activepieces/pieces-framework';
|
||||
|
||||
export function soapAuth() {
|
||||
return PieceAuth.CustomAuth({
|
||||
required: true,
|
||||
props: {
|
||||
type: Property.StaticDropdown({
|
||||
displayName: 'Authentication Type',
|
||||
required: true,
|
||||
options: {
|
||||
options: [
|
||||
{
|
||||
label: 'None',
|
||||
value: 'None',
|
||||
},
|
||||
{
|
||||
label: 'WS Security',
|
||||
value: 'WS',
|
||||
},
|
||||
{
|
||||
label: 'Basic Auth',
|
||||
value: 'Basic',
|
||||
},
|
||||
{
|
||||
label: 'Custom Header',
|
||||
value: 'Header',
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
username: Property.ShortText({
|
||||
displayName: 'Username',
|
||||
description: 'The WS Security username',
|
||||
required: false,
|
||||
}),
|
||||
password: Property.ShortText({
|
||||
displayName: 'Password',
|
||||
description: 'The WS Security password',
|
||||
required: false,
|
||||
}),
|
||||
customHeader: Property.LongText({
|
||||
displayName: 'Custom Header',
|
||||
description: 'Custom Header Content',
|
||||
required: false,
|
||||
}),
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -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