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-kissflow
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-kissflow` to build the library.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "@activepieces/piece-kissflow",
|
||||
"version": "0.0.2",
|
||||
"type": "commonjs",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-kissflow",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/kissflow/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/kissflow",
|
||||
"tsConfig": "packages/pieces/community/kissflow/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/kissflow/package.json",
|
||||
"main": "packages/pieces/community/kissflow/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/kissflow/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/kissflow/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"nx-release-publish": {
|
||||
"options": {
|
||||
"packageRoot": "dist/{projectRoot}"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/kissflow",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import { PieceAuth, Property } from '@activepieces/pieces-framework';
|
||||
|
||||
export const kissflowAuth = PieceAuth.CustomAuth({
|
||||
description: `
|
||||
You can generate your Access Key following these instructions:
|
||||
https://community.kissflow.com/t/35h4az8/api-authentication#access-keys
|
||||
`,
|
||||
required: true,
|
||||
props: {
|
||||
accountName: Property.ShortText({
|
||||
displayName: 'Account Name',
|
||||
description: 'Your kissflow account name eg. {account_name}.kissflow.com',
|
||||
required: true,
|
||||
}),
|
||||
accountId: Property.ShortText({
|
||||
displayName: 'Account ID',
|
||||
required: true,
|
||||
}),
|
||||
domainName: Property.StaticDropdown({
|
||||
displayName: 'Domain',
|
||||
options: {
|
||||
options: [
|
||||
{
|
||||
label: 'Default',
|
||||
value: 'kissflow.com',
|
||||
},
|
||||
{
|
||||
label: 'EU',
|
||||
value: 'kissflow.eu',
|
||||
},
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
}),
|
||||
accessKeyId: Property.ShortText({
|
||||
displayName: 'Access Key ID',
|
||||
required: true,
|
||||
}),
|
||||
accessKeySecret: PieceAuth.SecretText({
|
||||
displayName: 'Access Key Secret',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export type KissflowAuth = {
|
||||
accountName: string;
|
||||
accountId: string;
|
||||
domainName: string;
|
||||
accessKeyId: string;
|
||||
accessKeySecret: string;
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "No-Code-Plattform mit niedrigem Code",
|
||||
"Account Name": "Kontoname",
|
||||
"Account ID": "Konto-ID",
|
||||
"Domain": "Domäne",
|
||||
"Access Key ID": "Zugangsschlüssel ID",
|
||||
"Access Key Secret": "Schlüssel Geheimnis",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Ihr Kissflow-Kontoname zB. {account_name}.kissflow.com",
|
||||
"Default": "Standard",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nSie können Ihren Zugangsschlüssel nach folgenden Anweisungen generieren:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Anhang vom Formularfeld herunterladen",
|
||||
"Custom API Call": "Eigener API-Aufruf",
|
||||
"Downloads a specific attachment from a form field of your process.": "Laden Sie einen bestimmten Anhang aus einem Formularfeld Ihres Prozesses herunter.",
|
||||
"Make a custom API call to a specific endpoint": "Einen benutzerdefinierten API-Aufruf an einen bestimmten Endpunkt machen",
|
||||
"Process ID": "Prozess-ID",
|
||||
"Instance ID": "Instanz ID",
|
||||
"Activity Instance ID": "Aktivitätsinstanz ID",
|
||||
"Field ID": "Feld-ID",
|
||||
"Attachment ID": "Anhang-ID",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopfzeilen",
|
||||
"Query Parameters": "Abfrageparameter",
|
||||
"Body": "Körper",
|
||||
"Response is Binary ?": "Antwort ist binär?",
|
||||
"No Error on Failure": "Kein Fehler bei Fehler",
|
||||
"Timeout (in seconds)": "Timeout (in Sekunden)",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisierungs-Header werden automatisch von Ihrer Verbindung injiziert.",
|
||||
"Enable for files like PDFs, images, etc..": "Aktivieren für Dateien wie PDFs, Bilder, etc..",
|
||||
"GET": "ERHALTEN",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "LÖSCHEN",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Plataforma sin código bajo",
|
||||
"Account Name": "Nombre de cuenta",
|
||||
"Account ID": "ID de cuenta",
|
||||
"Domain": "Dominio",
|
||||
"Access Key ID": "Clave de acceso ID",
|
||||
"Access Key Secret": "Clave de acceso secreta",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Su nombre de cuenta de kissflow por ejemplo. {account_name}.kissflow.com",
|
||||
"Default": "Por defecto",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nPuede generar su clave de acceso siguiendo estas instrucciones:\nhttps://community.kissflow.com/t/35h4az8/api-autentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Descargar adjunto del campo de formulario",
|
||||
"Custom API Call": "Llamada API personalizada",
|
||||
"Downloads a specific attachment from a form field of your process.": "Descargue un archivo adjunto específico desde un campo de formulario de su proceso.",
|
||||
"Make a custom API call to a specific endpoint": "Hacer una llamada API personalizada a un extremo específico",
|
||||
"Process ID": "ID de proceso",
|
||||
"Instance ID": "ID de instancia",
|
||||
"Activity Instance ID": "ID de instancia de actividad",
|
||||
"Field ID": "ID del campo",
|
||||
"Attachment ID": "ID de adjunto",
|
||||
"Method": "Método",
|
||||
"Headers": "Encabezados",
|
||||
"Query Parameters": "Parámetros de consulta",
|
||||
"Body": "Cuerpo",
|
||||
"Response is Binary ?": "¿Respuesta es binaria?",
|
||||
"No Error on Failure": "No hay ningún error en fallo",
|
||||
"Timeout (in seconds)": "Tiempo de espera (en segundos)",
|
||||
"Authorization headers are injected automatically from your connection.": "Las cabeceras de autorización se inyectan automáticamente desde tu conexión.",
|
||||
"Enable for files like PDFs, images, etc..": "Activar para archivos como PDF, imágenes, etc.",
|
||||
"GET": "RECOGER",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "BORRAR",
|
||||
"HEAD": "LIMPIO"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Plateforme sans code bas",
|
||||
"Account Name": "Nom du compte",
|
||||
"Account ID": "ID du compte client",
|
||||
"Domain": "Domaine",
|
||||
"Access Key ID": "ID de la clé d'accès",
|
||||
"Access Key Secret": "Secret de la clé d'accès",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Nom de votre compte kissflow. {account_name}.kissflow.com",
|
||||
"Default": "Par défaut",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Télécharger la pièce jointe à partir du champ de formulaire",
|
||||
"Custom API Call": "Appel d'API personnalisé",
|
||||
"Downloads a specific attachment from a form field of your process.": "Télécharge une pièce jointe spécifique à partir d'un champ de formulaire de votre processus.",
|
||||
"Make a custom API call to a specific endpoint": "Passer un appel API personnalisé à un endpoint spécifique",
|
||||
"Process ID": "ID du processus",
|
||||
"Instance ID": "ID de l'instance",
|
||||
"Activity Instance ID": "ID de l'instance d'activité",
|
||||
"Field ID": "ID du champ",
|
||||
"Attachment ID": "ID de la pièce jointe",
|
||||
"Method": "Méthode",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Paramètres de requête",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "La réponse est Binaire ?",
|
||||
"No Error on Failure": "Aucune erreur en cas d'échec",
|
||||
"Timeout (in seconds)": "Délai d'expiration (en secondes)",
|
||||
"Authorization headers are injected automatically from your connection.": "Les Headers d'autorisation sont injectés automatiquement à partir de votre connexion.",
|
||||
"Enable for files like PDFs, images, etc..": "Activer pour les fichiers comme les PDFs, les images, etc.",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Low-code no-code platform",
|
||||
"Account Name": "口座名",
|
||||
"Account ID": "アカウントID",
|
||||
"Domain": "ドメイン",
|
||||
"Access Key ID": "アクセスキーID",
|
||||
"Access Key Secret": "アクセスキーシークレット",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "あなたのkissflowアカウント名。例: {account_name}.kissflow.com",
|
||||
"Default": "デフォルト",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\n次の手順に従ってアクセスキーを生成できます:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "フォーム項目から添付ファイルをダウンロード",
|
||||
"Custom API Call": "カスタムAPI通話",
|
||||
"Downloads a specific attachment from a form field of your process.": "プロセスのフォームフィールドから特定の添付ファイルをダウンロードします。",
|
||||
"Make a custom API call to a specific endpoint": "特定のエンドポイントへのカスタム API コールを実行します。",
|
||||
"Process ID": "プロセス ID",
|
||||
"Instance ID": "インスタンス ID",
|
||||
"Activity Instance ID": "アクティビティインスタンスID",
|
||||
"Field ID": "フィールドID",
|
||||
"Attachment ID": "添付ファイルID",
|
||||
"Method": "方法",
|
||||
"Headers": "ヘッダー",
|
||||
"Query Parameters": "クエリパラメータ",
|
||||
"Body": "本文",
|
||||
"Response is Binary ?": "応答はバイナリですか?",
|
||||
"No Error on Failure": "失敗時にエラーはありません",
|
||||
"Timeout (in seconds)": "タイムアウト(秒)",
|
||||
"Authorization headers are injected automatically from your connection.": "認証ヘッダは接続から自動的に注入されます。",
|
||||
"Enable for files like PDFs, images, etc..": "PDF、画像などのファイルを有効にします。",
|
||||
"GET": "取得",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "削除",
|
||||
"HEAD": "頭"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Low-code no-code platform",
|
||||
"Account Name": "Klant naam",
|
||||
"Account ID": "ID klant",
|
||||
"Domain": "Domein",
|
||||
"Access Key ID": "Toegangssleutel ID",
|
||||
"Access Key Secret": "Toegangssleutel geheim",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Uw kissflow account naam bijv. {account_name}.kissflow.com",
|
||||
"Default": "Standaard",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nU kunt uw toegangssleutel genereren na deze instructies:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Download bijlage van formulierveld",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Downloads a specific attachment from a form field of your process.": "Download een specifieke bijlage van een formulierveld van uw proces.",
|
||||
"Make a custom API call to a specific endpoint": "Maak een aangepaste API call naar een specifiek eindpunt",
|
||||
"Process ID": "Verwerk ID",
|
||||
"Instance ID": "Instantie ID",
|
||||
"Activity Instance ID": "Activiteit instantie ID",
|
||||
"Field ID": "Veld ID",
|
||||
"Attachment ID": "Bijlage ID",
|
||||
"Method": "Methode",
|
||||
"Headers": "Kopteksten",
|
||||
"Query Parameters": "Query parameters",
|
||||
"Body": "Lichaam",
|
||||
"Response is Binary ?": "Antwoord is binair?",
|
||||
"No Error on Failure": "Geen fout bij fout",
|
||||
"Timeout (in seconds)": "Time-out (in seconden)",
|
||||
"Authorization headers are injected automatically from your connection.": "Autorisatie headers worden automatisch geïnjecteerd vanuit uw verbinding.",
|
||||
"Enable for files like PDFs, images, etc..": "Inschakelen voor bestanden zoals PDF's, afbeeldingen etc..",
|
||||
"GET": "KRIJG",
|
||||
"POST": "POSTE",
|
||||
"PATCH": "BEKIJK",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "VERWIJDEREN",
|
||||
"HEAD": "HOOFD"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Plataforma no-code baixa",
|
||||
"Account Name": "Nome da Conta",
|
||||
"Account ID": "ID da Conta",
|
||||
"Domain": "Domínio",
|
||||
"Access Key ID": "Chave ID de acesso",
|
||||
"Access Key Secret": "Chave Segredo Acesso",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Nome de conta do beijsflow, por exemplo, {account_name}.kissflow.com",
|
||||
"Default": "Padrão",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "U\nVocê pode gerar sua chave de acesso seguindo estas instruções:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Baixar anexo do campo de formulário",
|
||||
"Custom API Call": "Chamada de API personalizada",
|
||||
"Downloads a specific attachment from a form field of your process.": "Baixa um anexo específico de um campo do formulário do seu processo.",
|
||||
"Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
|
||||
"Process ID": "ID do processo",
|
||||
"Instance ID": "ID da instância",
|
||||
"Activity Instance ID": "ID da Instância Atividade",
|
||||
"Field ID": "ID do campo",
|
||||
"Attachment ID": "ID do anexo",
|
||||
"Method": "Método",
|
||||
"Headers": "Cabeçalhos",
|
||||
"Query Parameters": "Parâmetros da consulta",
|
||||
"Body": "Conteúdo",
|
||||
"Response is Binary ?": "A resposta é binária ?",
|
||||
"No Error on Failure": "Nenhum erro no Failure",
|
||||
"Timeout (in seconds)": "Tempo limite (em segundos)",
|
||||
"Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
|
||||
"Enable for files like PDFs, images, etc..": "Habilitar para arquivos como PDFs, imagens, etc..",
|
||||
"GET": "OBTER",
|
||||
"POST": "POSTAR",
|
||||
"PATCH": "COMPRAR",
|
||||
"PUT": "COLOCAR",
|
||||
"DELETE": "EXCLUIR",
|
||||
"HEAD": "CABEÇA"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Low-code no-code platform",
|
||||
"Account Name": "Account Name",
|
||||
"Account ID": "Account ID",
|
||||
"Domain": "Domain",
|
||||
"Access Key ID": "Access Key ID",
|
||||
"Access Key Secret": "Access Key Secret",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Your kissflow account name eg. {account_name}.kissflow.com",
|
||||
"Default": "Default",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Download Attachment from Form Field",
|
||||
"Custom API Call": "Custom API Call",
|
||||
"Downloads a specific attachment from a form field of your process.": "Downloads a specific attachment from a form field of your process.",
|
||||
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
||||
"Process ID": "Process ID",
|
||||
"Instance ID": "Instance ID",
|
||||
"Activity Instance ID": "Activity Instance ID",
|
||||
"Field ID": "Field ID",
|
||||
"Attachment ID": "Attachment ID",
|
||||
"Method": "Method",
|
||||
"Headers": "Headers",
|
||||
"Query Parameters": "Query Parameters",
|
||||
"Body": "Body",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "No Error on Failure",
|
||||
"Timeout (in seconds)": "Timeout (in seconds)",
|
||||
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"GET": "GET",
|
||||
"POST": "POST",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "PUT",
|
||||
"DELETE": "DELETE",
|
||||
"HEAD": "HEAD"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"Low-code no-code platform": "Low-code no-code platform",
|
||||
"Account Name": "Account Name",
|
||||
"Account ID": "Account ID",
|
||||
"Domain": "Domain",
|
||||
"Access Key ID": "Access Key ID",
|
||||
"Access Key Secret": "Access Key Secret",
|
||||
"Your kissflow account name eg. {account_name}.kissflow.com": "Your kissflow account name eg. {account_name}.kissflow.com",
|
||||
"Default": "Default",
|
||||
"EU": "EU",
|
||||
"\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ": "\nYou can generate your Access Key following these instructions:\nhttps://community.kissflow.com/t/35h4az8/api-authentication#access-keys\n ",
|
||||
"Download Attachment from Form Field": "Download Attachment from Form Field",
|
||||
"Custom API Call": "自定义 API 呼叫",
|
||||
"Downloads a specific attachment from a form field of your process.": "Downloads a specific attachment from a form field of your process.",
|
||||
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
||||
"Process ID": "Process ID",
|
||||
"Instance ID": "Instance ID",
|
||||
"Activity Instance ID": "Activity Instance ID",
|
||||
"Field ID": "Field ID",
|
||||
"Attachment ID": "Attachment ID",
|
||||
"Method": "方法",
|
||||
"Headers": "信头",
|
||||
"Query Parameters": "查询参数",
|
||||
"Body": "正文内容",
|
||||
"Response is Binary ?": "Response is Binary ?",
|
||||
"No Error on Failure": "失败时没有错误",
|
||||
"Timeout (in seconds)": "超时(秒)",
|
||||
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
||||
"Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
|
||||
"GET": "获取",
|
||||
"POST": "帖子",
|
||||
"PATCH": "PATCH",
|
||||
"PUT": "弹出",
|
||||
"DELETE": "删除",
|
||||
"HEAD": "黑色"
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { createPiece } from '@activepieces/pieces-framework';
|
||||
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { kissflowAuth, KissflowAuth } from './auth';
|
||||
import { downloadAttachmentFromFormField } from './lib/actions/download-attachment-from-form-field';
|
||||
|
||||
export const kissflow = createPiece({
|
||||
displayName: 'Kissflow',
|
||||
description: 'Low-code no-code platform',
|
||||
categories: [PieceCategory.PRODUCTIVITY],
|
||||
auth: kissflowAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/kissflow.png',
|
||||
authors: ['danielpoonwj'],
|
||||
actions: [
|
||||
downloadAttachmentFromFormField,
|
||||
createCustomApiCallAction({
|
||||
baseUrl: (auth) => {
|
||||
if (!auth) {
|
||||
return ''
|
||||
}
|
||||
const typedAuth = auth.props;
|
||||
return `https://${typedAuth.accountName}.${typedAuth.domainName}/process/2/${typedAuth.accountId}/`;
|
||||
},
|
||||
auth: kissflowAuth,
|
||||
authMapping: async (auth) => {
|
||||
const typedAuth = auth.props;
|
||||
return {
|
||||
'X-Access-Key-Id': typedAuth.accessKeyId,
|
||||
'X-Access-Key-Secret': typedAuth.accessKeySecret,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,84 @@
|
||||
import {
|
||||
HttpMethod,
|
||||
httpClient,
|
||||
HttpHeaders,
|
||||
} from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
import { kissflowAuth } from '../../auth';
|
||||
|
||||
function extractAttachmentNameFromHeaders(
|
||||
headers?: HttpHeaders
|
||||
): string | null {
|
||||
let fileName = null;
|
||||
|
||||
const headerValue = headers?.['content-disposition'] as string;
|
||||
if (headerValue) {
|
||||
const parsedValue = contentDisposition.parse(headerValue);
|
||||
if (parsedValue.type === 'attachment') {
|
||||
const parsedFilename = parsedValue.parameters['filename'];
|
||||
if (parsedFilename) {
|
||||
fileName = parsedFilename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
export const downloadAttachmentFromFormField = createAction({
|
||||
name: 'downloadAttachmentFromFormField',
|
||||
displayName: 'Download Attachment from Form Field',
|
||||
description:
|
||||
'Downloads a specific attachment from a form field of your process.',
|
||||
auth: kissflowAuth,
|
||||
props: {
|
||||
processId: Property.ShortText({
|
||||
displayName: 'Process ID',
|
||||
required: true,
|
||||
}),
|
||||
instanceId: Property.ShortText({
|
||||
displayName: 'Instance ID',
|
||||
required: true,
|
||||
}),
|
||||
activityInstanceId: Property.ShortText({
|
||||
displayName: 'Activity Instance ID',
|
||||
required: true,
|
||||
}),
|
||||
fieldId: Property.ShortText({
|
||||
displayName: 'Field ID',
|
||||
required: true,
|
||||
}),
|
||||
attachmentId: Property.ShortText({
|
||||
displayName: 'Attachment ID',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const auth = context.auth;
|
||||
const { processId, instanceId, activityInstanceId, fieldId, attachmentId } =
|
||||
context.propsValue;
|
||||
|
||||
const requestUrl = `https://${auth.props.accountName}.${auth.props.domainName}/process/2/${auth.props.accountId}/${processId}/${instanceId}/${activityInstanceId}/${fieldId}/attachment/${attachmentId}`;
|
||||
const resp = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url: requestUrl,
|
||||
headers: {
|
||||
Accept: 'application/octet-stream',
|
||||
'X-Access-Key-Id': auth.props.accessKeyId,
|
||||
'X-Access-Key-Secret': auth.props.accessKeySecret,
|
||||
},
|
||||
responseType: 'arraybuffer',
|
||||
});
|
||||
|
||||
const fileName =
|
||||
extractAttachmentNameFromHeaders(resp.headers) || 'attachment';
|
||||
|
||||
return await context.files.write({
|
||||
fileName: fileName,
|
||||
data: Buffer.from(resp.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