Overview
The Attio SDK has evolved from automatic entry point discovery across your codebase to a centralizedapp.ts
definition file. This change provides better developer experience, clearer project
structure, and improved maintainability.
This guide is for you if you created your app before this change was applied and are upgrading to a
newer version of the SDK.
What changed
Before: Automatic discovery The CLI automatically scanned all files in yoursrc
directory to find entry point exports by name
(e.g. recordAction
, callRecordingInsightTextSelectionAction
)
After: App definition in app.ts
Entry points are explicitly organized under an App
definition object exported from an app.ts
file at the root of your project
Migration steps
If you don’t have anapp.ts
, we will prompt you to generate it when you run npm run dev
. The CLI
will:
- Scan your
src
directory for entry point exports - Generate appropriate imports based on discovered entry points
- Create
src/app.ts
with all entry points organized correctly
1
Create src/app.ts
Create a new file
src/app.ts
in your project:2
Import your entry points
Import all your existing entry points into the
app.ts
file and add them to the appropriate arrays:record.actions
- for record actionsrecord.bulkActions
- for bulk actionsrecord.widgets
- for record widgetscallRecording.insight.textActions
- for call recording insight text actionscallRecording.summary.textActions
- for call recording summary text actionscallRecording.transcript.textActions
- for call recording transcript text actions
3
Test the Migration
Run
npm run dev
to verify your app loads correctly with the new entry point.Best Practices
Use descriptive import names
Since we don’t need specifically named exports anymore, you can use descriptive names. The automatic migration won’t touch your existing files and only rename them in theapp.ts
imports, so you may
want to rename each of your entry points manually.
Organize your project structure
Although you can define entry points in any file undersrc
, we recommend organizing your entry
points into folders that follow the app
object structure. For example: