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-eth-name-service
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
||||
## Building
|
||||
|
||||
Run `nx build pieces-eth-name-service` to build the library.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "@activepieces/piece-eth-name-service",
|
||||
"version": "0.0.8"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"name": "pieces-eth-name-service",
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/pieces/community/eth-name-service/src",
|
||||
"projectType": "library",
|
||||
"release": {
|
||||
"version": {
|
||||
"currentVersionResolver": "git-tag",
|
||||
"preserveLocalDependencyProtocols": false,
|
||||
"manifestRootsToUpdate": [
|
||||
"dist/{projectRoot}"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tags": [],
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"outputs": [
|
||||
"{options.outputPath}"
|
||||
],
|
||||
"options": {
|
||||
"outputPath": "dist/packages/pieces/community/eth-name-service",
|
||||
"tsConfig": "packages/pieces/community/eth-name-service/tsconfig.lib.json",
|
||||
"packageJson": "packages/pieces/community/eth-name-service/package.json",
|
||||
"main": "packages/pieces/community/eth-name-service/src/index.ts",
|
||||
"assets": [
|
||||
"packages/pieces/community/eth-name-service/*.md",
|
||||
{
|
||||
"input": "packages/pieces/community/eth-name-service/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/eth-name-service",
|
||||
"command": "bun install --no-save --silent"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) ist ein dezentralisiertes Namenssystem an der Ethereum Blockchain.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Hol dir deinen Api Key: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Liste der ENS-Domains",
|
||||
"List the ENS domains for a given address.": "Liste der ENS Domains für eine angegebene Adresse.",
|
||||
"Address": "Adresse",
|
||||
"Address to list ENS domains for": "Adresse zur Liste der ENS-Domains für"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "El Servicio Ethereum Name.com es un sistema de nomenclatura descentralizado en la cadena de bloques Ethereum.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Obtén tu clave api: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Listar dominios ENS",
|
||||
"List the ENS domains for a given address.": "Listar los dominios ENS de una dirección determinada.",
|
||||
"Address": "Dirección",
|
||||
"Address to list ENS domains for": "Dirección de la lista de dominios ENS para"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) est un système de nommage décentralisé sur la blockchain Ethereum.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Obtenez votre clé api : https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Lister les domaines ENS",
|
||||
"List the ENS domains for a given address.": "Liste les domaines ENS pour une adresse donnée.",
|
||||
"Address": "Adresses",
|
||||
"Address to list ENS domains for": "Adresse pour lister les domaines ENS pour"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service(ENS)は、Ethereumブロックチェーン上の分散型ネーミングシステムです。",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*APIキーを取得: https://thegraph.com/studio/apikies",
|
||||
"List ENS Domains": "ENSドメインの一覧",
|
||||
"List the ENS domains for a given address.": "指定されたアドレスの ENS ドメインをリストします。",
|
||||
"Address": "住所",
|
||||
"Address to list ENS domains for": "ENSドメイン一覧へのアドレス"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) is een gedecentraliseerd naamgeving systeem op de Ethereum-blockchain.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Krijg uw api Sleutel: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Lijst van ENS-domeinen",
|
||||
"List the ENS domains for a given address.": "Vermeld de ENS-domeinen voor een opgegeven adres.",
|
||||
"Address": "Adres:",
|
||||
"Address to list ENS domains for": "Adres om ENS-domeinen te tonen voor"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "O Serviço de Nome Ethereum (ENS) é um sistema de nomes descentralizado na blockchain Ethereum.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Obtenha sua chave de api: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Listar domínios ENS",
|
||||
"List the ENS domains for a given address.": "Lista os domínios ENS para um endereço fornecido.",
|
||||
"Address": "Endereço",
|
||||
"Address to list ENS domains for": "Endereço para listar domínios ENS para"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS)": "Служба имен Ethereum (ENS)",
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) – децентрализованная система именования на блокчейне Ethereum.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Получить ваш ключ api Key: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "Список ENS доменов",
|
||||
"List the ENS domains for a given address.": "Список доменов ENS для данного адреса.",
|
||||
"Address": "Адрес",
|
||||
"Address to list ENS domains for": "Адрес в список ENS доменов для"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Get your api Key: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "List ENS Domains",
|
||||
"List the ENS domains for a given address.": "List the ENS domains for a given address.",
|
||||
"Address": "Address",
|
||||
"Address to list ENS domains for": "Address to list ENS domains for"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS)": "Ethereum Name Service (ENS)",
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Get your api Key: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "List ENS Domains",
|
||||
"List the ENS domains for a given address.": "List the ENS domains for a given address.",
|
||||
"Address": "Address",
|
||||
"Address to list ENS domains for": "Address to list ENS domains for"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.": "Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.",
|
||||
"*Get your api Key: https://thegraph.com/studio/apikeys": "*Get your api Key: https://thegraph.com/studio/apikeys",
|
||||
"List ENS Domains": "List ENS Domains",
|
||||
"List the ENS domains for a given address.": "List the ENS domains for a given address.",
|
||||
"Address": "Address",
|
||||
"Address to list ENS domains for": "Address to list ENS domains for"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
import { createPiece } from '@activepieces/pieces-framework';
|
||||
import { listEnsDomains } from './lib/actions/list-ens-domains';
|
||||
import { ensCommon } from './lib/common/common';
|
||||
|
||||
export const ethNameService = createPiece({
|
||||
displayName: 'Ethereum Name Service (ENS)',
|
||||
description: 'Ethereum Name Service (ENS) is a decentralized naming system on the Ethereum blockchain.',
|
||||
auth: ensCommon.auth,
|
||||
minimumSupportedRelease: '0.20.0',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/eth-name-service.png',
|
||||
authors: ['reemayoush'],
|
||||
actions: [listEnsDomains],
|
||||
triggers: [],
|
||||
});
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
import { createAction, Property } from '@activepieces/pieces-framework';
|
||||
import { ensCommon } from '../common/common';
|
||||
|
||||
export const listEnsDomains = createAction({
|
||||
name: 'listEnsDomains',
|
||||
auth: ensCommon.auth,
|
||||
displayName: 'List ENS Domains',
|
||||
description: 'List the ENS domains for a given address.',
|
||||
props: {
|
||||
address: Property.ShortText({
|
||||
displayName: 'Address',
|
||||
description: 'Address to list ENS domains for',
|
||||
required: true,
|
||||
}),
|
||||
},
|
||||
async run(context) {
|
||||
const { address } = context.propsValue;
|
||||
|
||||
if (!address) {
|
||||
throw new Error('Address is required');
|
||||
}
|
||||
|
||||
const query = `
|
||||
{
|
||||
domains(where: { owner: "${address.toLowerCase()}" }) {
|
||||
id
|
||||
name
|
||||
labelName
|
||||
labelhash
|
||||
parent {
|
||||
id
|
||||
}
|
||||
subdomains {
|
||||
id
|
||||
name
|
||||
}
|
||||
subdomainCount
|
||||
resolvedAddress {
|
||||
id
|
||||
}
|
||||
resolver {
|
||||
id
|
||||
address
|
||||
}
|
||||
ttl
|
||||
isMigrated
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const res = await ensCommon.apiCall(
|
||||
`https://gateway.thegraph.com/api/${context.auth.secret_text}/subgraphs/id/5XqPmWe6gjyrJtFn9cLy237i4cWw2j9HcUJEXsP5qGtH`,
|
||||
'POST',
|
||||
{ query }
|
||||
);
|
||||
if (res.errors) {
|
||||
throw new Error(res.errors[0].message);
|
||||
}
|
||||
|
||||
return res.data.domains;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
PieceAuth,
|
||||
} from '@activepieces/pieces-framework';
|
||||
|
||||
export const ensCommon = {
|
||||
auth: PieceAuth.SecretText({
|
||||
displayName: 'API Key',
|
||||
description: '*Get your api Key: https://thegraph.com/studio/apikeys',
|
||||
required: true,
|
||||
}),
|
||||
apiCall: async function (
|
||||
url: string,
|
||||
method: string,
|
||||
data: object | undefined = undefined,
|
||||
token: string | undefined = undefined
|
||||
) {
|
||||
const headers: Record<string, string> = {
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
if (token) {
|
||||
headers['Authorization'] = `Bearer ${token}`;
|
||||
}
|
||||
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
headers,
|
||||
body: data ? JSON.stringify(data) : undefined,
|
||||
});
|
||||
|
||||
return response.json();
|
||||
},
|
||||
};
|
||||
@@ -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