Optional
options: OptionsGet list of customizable collections
Retrieve schema of the agent
Create a new API chart
.addChart('numCustomers', {
type: 'Value',
render: (context, resultBuilder) => {
return resultBuilder.value(123);
}
})
name of the chart
definition of the chart
Add a datasource
the datasource to add
Optional
options: DataSourceOptionsthe options
Allow to interact with a decorated collection
.customizeCollection('books', books => books.renameField('xx', 'yy'))
the name of the collection to manipulate
a function that provide a collection builder on the given collection name
Find a collection by name. Returns undefined if the collection is missing
name of the collection
Get given collection by name
name of the collection
Remove collections from the exported schema (they will still be usable within the agent).
.removeCollection('aCollectionToRemove', 'anotherCollectionToRemove');
Rest
...names: Extract<keyof S, string>[]the collections to remove
Load a plugin across all collections
import { advancedExport } from '@forestadmin/plugin-advanced-export';
dataSourceCustomizer.use(advancedExportPlugin, { format: 'xlsx' });
instance of the plugin
Optional
options: TOptionsoptions which need to be passed to the plugin
Allow to create a new Forest Admin agent from scratch. Builds the application by composing and configuring all the collection decorators.
Minimal code to add a datasource
Example