- 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>
75 lines
2.3 KiB
TypeScript
75 lines
2.3 KiB
TypeScript
import {
|
|
createCustomApiCallAction,
|
|
HttpMethod,
|
|
} from '@activepieces/pieces-common';
|
|
import { AppConnectionValueForAuthProperty, createPiece, PieceAuth } from '@activepieces/pieces-framework';
|
|
import { wufooApiCall } from './lib/common/client';
|
|
import { createFormEntryAction } from './lib/actions/create-form-entry';
|
|
import { findFormAction } from './lib/actions/find-form';
|
|
import { findSubmissionByFieldAction } from './lib/actions/find-submission-by-field';
|
|
import { getEntryDetailsAction } from './lib/actions/get-entry-details';
|
|
import { newFormEntryTrigger } from './lib/triggers/new-form-entry';
|
|
import { newFormTrigger } from './lib/triggers/new-form';
|
|
import { AppConnectionType } from '@activepieces/shared';
|
|
|
|
export const wufooAuth = PieceAuth.CustomAuth({
|
|
description: 'Enter your Wufoo API Key and Subdomain.',
|
|
props: {
|
|
apiKey: PieceAuth.SecretText({
|
|
displayName: 'API Key',
|
|
required: true,
|
|
}),
|
|
subdomain: PieceAuth.SecretText({
|
|
displayName: 'Subdomain',
|
|
description:
|
|
'Your Wufoo account subdomain (e.g., for fishbowl.wufoo.com, use "fishbowl")',
|
|
required: true,
|
|
}),
|
|
},
|
|
validate: async ({ auth }) => {
|
|
try {
|
|
await wufooApiCall({
|
|
method: HttpMethod.GET,
|
|
auth: {
|
|
props: auth,
|
|
type: AppConnectionType.CUSTOM_AUTH,
|
|
},
|
|
resourceUri: '/forms.json',
|
|
});
|
|
return { valid: true };
|
|
} catch (e) {
|
|
return {
|
|
valid: false,
|
|
error: 'Invalid API Key or Subdomain',
|
|
};
|
|
}
|
|
},
|
|
required: true,
|
|
});
|
|
|
|
export const wufoo = createPiece({
|
|
displayName: 'Wufoo',
|
|
auth: wufooAuth,
|
|
minimumSupportedRelease: '0.36.1',
|
|
logoUrl: 'https://cdn.activepieces.com/pieces/wufoo.png',
|
|
authors: ['krushnarout','onyedikachi-david'],
|
|
actions: [
|
|
createFormEntryAction,
|
|
findFormAction,
|
|
findSubmissionByFieldAction,
|
|
getEntryDetailsAction,
|
|
createCustomApiCallAction({
|
|
auth: wufooAuth,
|
|
baseUrl: (auth: any) => `https://${auth.subdomain}.wufoo.com/api/v3`,
|
|
authMapping: async (auth) => {
|
|
const { apiKey } = auth.props;
|
|
const encoded = Buffer.from(`${apiKey}:footastic`).toString('base64');
|
|
return {
|
|
Authorization: `Basic ${encoded}`,
|
|
};
|
|
},
|
|
}),
|
|
],
|
|
triggers: [newFormEntryTrigger, newFormTrigger],
|
|
});
|