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,95 @@
|
||||
import {
|
||||
createPiece,
|
||||
PieceAuth,
|
||||
PiecePropValueSchema,
|
||||
} from '@activepieces/pieces-framework';
|
||||
import { BASE_URL, CopperAuth } from './lib/common/constants';
|
||||
import { newPerson } from './lib/triggers/new-person';
|
||||
import { newLead } from './lib/triggers/new-lead';
|
||||
import { newTask } from './lib/triggers/new-task';
|
||||
import { updatedLead } from './lib/triggers/updated-lead';
|
||||
import { updatedTask } from './lib/triggers/updated-task';
|
||||
import { updatedOpportunity } from './lib/triggers/updated-opportunity';
|
||||
import { updatedOpportunityStage } from './lib/triggers/updated-opportunity-stage';
|
||||
import { updatedOpportunityStatus } from './lib/triggers/updated-opportunity-status';
|
||||
import { updatedProject } from './lib/triggers/updated-project';
|
||||
import { updatedLeadStatus } from './lib/triggers/updated-lead-status';
|
||||
import { createPerson } from './lib/actions/create-person';
|
||||
import { updatePerson } from './lib/actions/update-person';
|
||||
import { createLead } from './lib/actions/create-lead';
|
||||
import { updateLead } from './lib/actions/update-lead';
|
||||
import { convertLead } from './lib/actions/convert-lead';
|
||||
import { createCompany } from './lib/actions/create-company';
|
||||
import { updateCompany } from './lib/actions/update-company';
|
||||
import { createOpportunity } from './lib/actions/create-opportunity';
|
||||
import { updateOpportunity } from './lib/actions/update-opportunity';
|
||||
import { createProject } from './lib/actions/create-project';
|
||||
import { updateProject } from './lib/actions/update-project';
|
||||
import { createTask } from './lib/actions/create-task';
|
||||
import { createActivity } from './lib/actions/create-activity';
|
||||
import { searchForAnActivity } from './lib/actions/search-for-an-activity';
|
||||
import { searchForAPerson } from './lib/actions/search-for-a-person';
|
||||
import { searchForALead } from './lib/actions/search-for-a-lead';
|
||||
import { searchForACompany } from './lib/actions/search-for-a-company';
|
||||
import { searchForAnOpportunity } from './lib/actions/search-for-an-opportunity';
|
||||
import { searchForAProject } from './lib/actions/search-for-a-project';
|
||||
import { newActivity } from './lib/triggers/new-activity';
|
||||
import { PieceCategory } from '@activepieces/shared';
|
||||
import { createCustomApiCallAction } from '@activepieces/pieces-common';
|
||||
|
||||
export const copper = createPiece({
|
||||
displayName: 'Copper',
|
||||
auth: CopperAuth,
|
||||
minimumSupportedRelease: '0.36.1',
|
||||
logoUrl: 'https://cdn.activepieces.com/pieces/copper.png',
|
||||
authors: ['gs03-dev'],
|
||||
categories: [PieceCategory.SALES_AND_CRM, PieceCategory.PRODUCTIVITY],
|
||||
actions: [
|
||||
createPerson,
|
||||
updatePerson,
|
||||
createLead,
|
||||
updateLead,
|
||||
convertLead,
|
||||
createCompany,
|
||||
updateCompany,
|
||||
createOpportunity,
|
||||
updateOpportunity,
|
||||
createProject,
|
||||
updateProject,
|
||||
createTask,
|
||||
createActivity,
|
||||
searchForAnActivity,
|
||||
searchForAPerson,
|
||||
searchForALead,
|
||||
searchForACompany,
|
||||
searchForAnOpportunity,
|
||||
searchForAProject,
|
||||
createCustomApiCallAction({
|
||||
auth: CopperAuth,
|
||||
baseUrl: () => BASE_URL,
|
||||
authMapping: async (auth) => {
|
||||
|
||||
return {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
'X-PW-AccessToken': auth.props.apiKey,
|
||||
'X-PW-Application': 'developer_api',
|
||||
'X-PW-UserEmail': auth.props.email,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
triggers: [
|
||||
newActivity,
|
||||
newPerson,
|
||||
newLead,
|
||||
newTask,
|
||||
updatedLead,
|
||||
updatedTask,
|
||||
updatedOpportunity,
|
||||
updatedOpportunityStage,
|
||||
updatedOpportunityStatus,
|
||||
updatedProject,
|
||||
updatedLeadStatus,
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user