## Add API client generation to SDK dev mode and refactor orchestrator into step-based pipeline ### Why The SDK dev mode lacked typed API client generation, forcing developers to work without auto-generated GraphQL types when building applications. Additionally, the orchestrator was a monolithic class that mixed watcher management, token handling, and sync logic — making it difficult to extend with new steps like client generation. ### How - **Refactored the orchestrator** into a step-based pipeline with dedicated classes: `CheckServer`, `EnsureValidTokens`, `ResolveApplication`, `BuildManifest`, `UploadFiles`, `GenerateApiClient`, `SyncApplication`, and `StartWatchers`. Each step has typed input/output/status, managed by a new `OrchestratorState` class. - **Added `GenerateApiClientOrchestratorStep`** that detects object/field schema changes and regenerates a typed GraphQL client (via `@genql/cli`) into `node_modules/twenty-sdk/generated` for seamless imports. - **Replaced `checkApplicationExist`** with `findOneApplication` on both server resolver and SDK API service, returning the entity data instead of a boolean. - **Added application token pair mutations** (`generateApplicationToken`, `renewApplicationToken`) to the API service, with the server now returning `ApplicationTokenPairDTO` containing both access and refresh tokens. - **Restructured the dev UI** into `dev/ui/components/` with dedicated panel, section, and event log components. - **Simplified `AppDevCommand`** from ~180 lines of watcher management down to ~40 lines that delegate entirely to the orchestrator.
Mailchimp synchronizer
Synchronizing contacts between Twenty and Mailchimp
Requirements
- Mailchimp API key - Mailchimp > avatar in top right corner > Profile > Extras > API keys
Setup
- Add app to your workspace
cd packages/twenty-apps/community/mailchimp-synchronizer
yarn auth
yarn generate
yarn sync
- Go to Settings > Integrations > Mailchimp synchronizer > Settings and add required variables
Flow
- Check if required variables are set, if not, exit
- Validate data based on set constraints, if data doesn't match constraints, exit
- Check if person already exists in Mailchimp:
- if yes, check if UPDATE_PERSON is set to true
- if UPDATE_PERSON is true, check if Twenty record is the same as Mailchimp record
- if they're the same, exit
- if not, update
- if UPDATE_PERSON is false, exit
- if UPDATE_PERSON is true, check if Twenty record is the same as Mailchimp record
- if person doesn't exist in Mailchimp, send a request to Mailchimp with new contact
- if yes, check if UPDATE_PERSON is set to true
Note
- SMS support is experimental and may cause errors
- constraints are directly responsible for sent data so if e.g. you want to have a company name in Mailchimp, you have to set IS_COMPANY_CONSTRAINT to true