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-binance
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Running lint
|
||||
|
||||
Run `nx lint pieces-binance` to execute the lint via [ESLint](https://eslint.org/).
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-binance",
|
||||
"version": "0.3.7"
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "pieces-binance",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/binance/src",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/binance",
|
||||
"tsConfig": "packages/pieces/community/binance/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/binance/package.json",
|
||||
"main": "packages/pieces/community/binance/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/binance/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/binance/src/i18n",
|
||||
"output": "./src/i18n",
|
||||
"glob": "**/!(i18n.json)"
|
||||
}
|
||||
],
|
||||
"buildableProjectDepsInPackageJsonType": "dependencies",
|
||||
"updateBuildableProjectDepsInPackageJson": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build",
|
||||
"prebuild"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
},
|
||||
"prebuild": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "packages/pieces/community/binance",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Rufe den Preis eines Krypto-Paares aus Binanz ab",
|
||||
"Fetch Pair Price": "Paarpreis abrufen",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Holen Sie den aktuellen Preis eines Paares (z.B. BTC/USDT)",
|
||||
"First Coin Symbol": "Erstes Münzsymbol",
|
||||
"Second Coin Symbol": "Zweites Münzsymbol",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "Die Währung, für die der Preis abgerufen wird (z.B. 'BTC' in 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "Die Währung, in der der Preis abgerufen wird (z.B. 'USDT' in 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Obtener el precio de un par de criptomonedas de Binance",
|
||||
"Fetch Pair Price": "Obtener precio de par",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Obtener el precio actual de un par (ej. BTC/USDT)",
|
||||
"First Coin Symbol": "Primer símbolo de moneda",
|
||||
"Second Coin Symbol": "Segundo símbolo de moneda",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "La moneda para obtener el precio (por ejemplo, 'BTC' en 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "La moneda en la que obtener el precio (por ejemplo, 'USDT' en 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Récupérer le prix d'une paire de cryptomonnaies de Binance",
|
||||
"Fetch Pair Price": "Récupérer le prix de la paire",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Récupérer le prix actuel d'une paire (par exemple BTC/USDT)",
|
||||
"First Coin Symbol": "Premier Symbole de Pièce",
|
||||
"Second Coin Symbol": "Second Symbole de Pièce",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "La devise pour laquelle récupérer le prix (par exemple 'BTC' dans 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "La devise dans laquelle récupérer le prix (ex: 'USDT' en 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Binanceから暗号ペアの価格を取得",
|
||||
"Fetch Pair Price": "ペア価格を取得",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "ペアの現在の価格を取得します (例: BTC / USDT)",
|
||||
"First Coin Symbol": "最初のコインシンボル",
|
||||
"Second Coin Symbol": "2番目のコインシンボル",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "価格を取得する通貨 (例: 'BTC' in 'BTC / USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "価格を取得する通貨(例:'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "De prijs van een crypto-paar ophalen van Binance",
|
||||
"Fetch Pair Price": "Pakket Pair Prijs",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Ophalen van de huidige prijs van een paar (bijvoorbeeld BTC/USDT)",
|
||||
"First Coin Symbol": "Eerste Munt Symbool",
|
||||
"Second Coin Symbol": "Tweede Munt Symbool",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "De valuta om de prijs van (bijvoorbeeld 'BTC' in 'BTC/USDT') op te halen",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "De valuta om de prijs op te halen (bijvoorbeeld 'USDT' in 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Obter o preço de um par de criptomoedas da Binance",
|
||||
"Fetch Pair Price": "Buscar Preço do Par",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Buscar o preço atual de um par (por exemplo, BTC/USDT)",
|
||||
"First Coin Symbol": "Símbolo da Primeira Moeda",
|
||||
"Second Coin Symbol": "Símbolo da Segunda Moeda",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "A moeda para buscar o preço (por exemplo, 'BTC' em 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "A moeda para buscar o preço (por exemplo, 'USDT' em 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Binance": "Бинанс",
|
||||
"Fetch the price of a crypto pair from Binance": "Получить цену пары криптовалют с Binance",
|
||||
"Fetch Pair Price": "Получить цену на пару",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Получить текущую цену пары (например, BTC/USDT)",
|
||||
"First Coin Symbol": "Символ первой монеты",
|
||||
"Second Coin Symbol": "Вторая монета",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "Валюта для получения цены (например, 'BTC' в 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "Валюта для получения цены (например 'USDT' в 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Fetch the price of a crypto pair from Binance",
|
||||
"Fetch Pair Price": "Fetch Pair Price",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Fetch the current price of a pair (e.g. BTC/USDT)",
|
||||
"First Coin Symbol": "First Coin Symbol",
|
||||
"Second Coin Symbol": "Second Coin Symbol",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Binance": "Binance",
|
||||
"Fetch the price of a crypto pair from Binance": "Fetch the price of a crypto pair from Binance",
|
||||
"Fetch Pair Price": "Fetch Pair Price",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Fetch the current price of a pair (e.g. BTC/USDT)",
|
||||
"First Coin Symbol": "First Coin Symbol",
|
||||
"Second Coin Symbol": "Second Coin Symbol",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Fetch the price of a crypto pair from Binance": "Fetch the price of a crypto pair from Binance",
|
||||
"Fetch Pair Price": "Fetch Pair Price",
|
||||
"Fetch the current price of a pair (e.g. BTC/USDT)": "Fetch the current price of a pair (e.g. BTC/USDT)",
|
||||
"First Coin Symbol": "First Coin Symbol",
|
||||
"Second Coin Symbol": "Second Coin Symbol",
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')": "The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')",
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')": "The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
|
||||
import { fetchCryptoPairPrice } from './lib/actions/fetch-pair-price';
|
||||
|
||||
export const binance = createPiece({
|
||||
displayName: 'Binance',
|
||||
description: 'Fetch the price of a crypto pair from Binance',
|
||||
minimumSupportedRelease: '0.30.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/binance.png',
|
||||
categories: [],
|
||||
auth: PieceAuth.None(),
|
||||
actions: [fetchCryptoPairPrice],
|
||||
authors: ["kishanprmr","khaledmashaly","abuaboud"],
|
||||
triggers: [],
|
||||
});
|
||||
@@ -0,0 +1,49 @@
|
||||
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
|
||||
export const fetchCryptoPairPrice = createAction({
|
||||
name: 'fetch_crypto_pair_price',
|
||||
displayName: 'Fetch Pair Price',
|
||||
description: 'Fetch the current price of a pair (e.g. BTC/USDT)',
|
||||
props: {
|
||||
first_coin: Property.ShortText({
|
||||
displayName: 'First Coin Symbol',
|
||||
description:
|
||||
"The currency to fetch the price for (e.g. 'BTC' in 'BTC/USDT')",
|
||||
required: true,
|
||||
}),
|
||||
second_coin: Property.ShortText({
|
||||
displayName: 'Second Coin Symbol',
|
||||
description:
|
||||
"The currency to fetch the price in (e.g. 'USDT' in 'BTC/USDT')",
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { first_coin, second_coin } = context.propsValue;
|
||||
if (first_coin && second_coin)
|
||||
return await fetchCryptoPairPriceImpl(`${first_coin}${second_coin}`);
|
||||
throw Error('Missing parameter(s)');
|
||||
},
|
||||
});
|
||||
|
||||
async function fetchCryptoPairPriceImpl(symbol: string): Promise<number> {
|
||||
const formattedSymbol = symbol
|
||||
.replace('/', '')
|
||||
.replace(' ', '')
|
||||
.toUpperCase();
|
||||
|
||||
const url = `https://api.binance.com/api/v3/ticker/price?symbol=${formattedSymbol}`;
|
||||
|
||||
try {
|
||||
const response = await httpClient.sendRequest({
|
||||
method: HttpMethod.GET,
|
||||
url,
|
||||
});
|
||||
const data = await response.body;
|
||||
return Number(data['price']);
|
||||
} catch (error) {
|
||||
console.error(`Error fetching price for symbol ${symbol}:`, error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
],
|
||||
"compilerOptions": {
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
}
|
||||
}
|
||||
@@ -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