Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

2.9 KB
Raw Blame
import { createPiece } from "@activepieces/pieces-framework";
import { PieceCategory } from '@activepieces/pieces-framework';
import { createCustomApiCallAction } from "@activepieces/pieces-common";
import {
  housecallProAuth,
  baseUrl,
  // Customer actions
  createCustomer,
  getCustomers,
  getCustomer,
  updateCustomer,
  getCustomerAddresses,
  createCustomerAddress,
  getCustomerAddress,
  // Job actions
  createJob,
  getJobs,
  getJob,
  updateJobSchedule,
  deleteJobSchedule,
  createJobAppointment,
  getJobAppointments,
  updateJobAppointment,
  deleteJobAppointment,
  addJobNote,
  deleteJobNote,
  addJobAttachment,
  addJobLineItem,
  updateJobLineItem,
  deleteJobLineItem,
  getJobLineItems,
  addJobTag,
  removeJobTag,
  createJobLink,
  getJobInvoices,
  getJobInputMaterials,
  bulkUpdateJobLineItems,
  bulkUpdateJobInputMaterials,
  dispatchJobToEmployees,
  lockJob,
  lockJobs,
  // Estimate actions
  createEstimate,
  getEstimate,
  getEstimates,
  createEstimateOptionNote,
  deleteEstimateOptionNote,
  createEstimateOptionAttachment,
  createEstimateOptionLink,
  updateEstimateOptionSchedule,
  // Lead actions
  createLead,
  getLead,
  getLeads,
  convertLeadToEstimateOrJob,
} from "./lib/common";

export const housecallPro = createPiece({
  displayName: "Housecall Pro",
  description: "Manage your home service business with Housecall Pro CRM integration",
  auth: housecallProAuth,
  minimumSupportedRelease: '0.36.1',
  logoUrl: "https://cdn.activepieces.com/pieces/housecall-pro.png",
  categories: [PieceCategory.SALES_AND_CRM],
  authors: ["Activepieces"],
  actions: [
    // Customer actions
    createCustomer,
    getCustomers,
    getCustomer,
    updateCustomer,
    getCustomerAddresses,
    createCustomerAddress,
    getCustomerAddress,
    // Job actions
    createJob,
    getJobs,
    getJob,
    updateJobSchedule,
    deleteJobSchedule,
    createJobAppointment,
    getJobAppointments,
    updateJobAppointment,
    deleteJobAppointment,
    addJobNote,
    deleteJobNote,
    addJobAttachment,
    addJobLineItem,
    updateJobLineItem,
    deleteJobLineItem,
    getJobLineItems,
    addJobTag,
    removeJobTag,
    createJobLink,
    getJobInvoices,
    getJobInputMaterials,
    bulkUpdateJobLineItems,
    bulkUpdateJobInputMaterials,
    dispatchJobToEmployees,
    lockJob,
    lockJobs,
    // Estimate actions
    createEstimate,
    getEstimate,
    getEstimates,
    createEstimateOptionNote,
    deleteEstimateOptionNote,
    createEstimateOptionAttachment,
    createEstimateOptionLink,
    updateEstimateOptionSchedule,
    // Lead actions
    createLead,
    getLead,
    getLeads,
    convertLeadToEstimateOrJob,
    // Custom API Call
    createCustomApiCallAction({
      baseUrl: () => baseUrl,
      auth: housecallProAuth,
      authMapping: async (auth) => ({
        "Authorization": `Token ${auth.secret_text}`,
        "Content-Type": "application/json",
      }),
    }),
  ],
  triggers: [],
});