- 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>
47 lines
1.6 KiB
TypeScript
47 lines
1.6 KiB
TypeScript
import { apId, Field, FieldState, FieldType, PopulatedTable, TableAutomationStatus } from '@activepieces/shared'
|
|
import { faker } from '@faker-js/faker'
|
|
|
|
export const tableGenerator = {
|
|
simpleTable(table: Partial<PopulatedTable>): PopulatedTable {
|
|
const tableId = apId()
|
|
return {
|
|
id: tableId,
|
|
name: faker.lorem.word(),
|
|
externalId: table.externalId ?? apId(),
|
|
fields: table.fields ?? [
|
|
tableGenerator.generateRandomField(tableId),
|
|
tableGenerator.generateRandomField(tableId),
|
|
],
|
|
projectId: apId(),
|
|
created: faker.date.recent().toISOString(),
|
|
updated: faker.date.recent().toISOString(),
|
|
status: table.status ?? TableAutomationStatus.ENABLED,
|
|
trigger: table.trigger ?? null,
|
|
}
|
|
},
|
|
generateRandomField(tableId: string): Field {
|
|
return {
|
|
id: apId(),
|
|
projectId: apId(),
|
|
created: faker.date.recent().toISOString(),
|
|
updated: faker.date.recent().toISOString(),
|
|
tableId,
|
|
name: faker.lorem.word(),
|
|
type: FieldType.TEXT,
|
|
externalId: apId(),
|
|
}
|
|
},
|
|
generateRandomDropdownField(): FieldState {
|
|
return {
|
|
name: faker.lorem.word(),
|
|
type: FieldType.STATIC_DROPDOWN,
|
|
externalId: apId(),
|
|
data: {
|
|
options: [
|
|
{ value: faker.lorem.word() },
|
|
{ value: faker.lorem.word() },
|
|
],
|
|
},
|
|
}
|
|
},
|
|
}
|