To enable users to easily, and with type safety, execute their remote saved queries from Outerbase in their own project we want to enable the ability to sync your saved queries to your project. This ensure you only send query ID's of those that actually exist. When they are deleted from your workspace and you re-sync them, then your project should throw errors alerting you.
In usage:
const connection: OuterbaseConnection = new OuterbaseConnection('FAKE_API_KEY')
connection.runSavedQuery(RemoteQuery['My Query Name'])
Tasks
[X] Handlebars takes an array of queries and generates an ./index.ts file that exports an enum of saved remote queries
[X] Export the package command for other projects to use
[ ] Network call uses API token to fetch all saved queries for that base
Verify
Open another project
Run npm link ../sdk
Add to your package scripts sync-remote-queries ./queries API_KEY=your_api_key
Run the script npm run sync-remote-queries
Verify your saved queries are named in an export in the provided path above
Purpose
To enable users to easily, and with type safety, execute their remote saved queries from Outerbase in their own project we want to enable the ability to sync your saved queries to your project. This ensure you only send query ID's of those that actually exist. When they are deleted from your workspace and you re-sync them, then your project should throw errors alerting you.
In usage:
Tasks
./index.ts
file that exports an enum of saved remote queriesVerify
npm link ../sdk
sync-remote-queries ./queries API_KEY=your_api_key
npm run sync-remote-queries
Before
After