The name of the filter
The actual filter. It follows the form of the filter
query parameter of the List all records endpoint.
The columns to show with this filter
The ordering to apply with this filter, or null
for the default model ordering. It follows the form of the order_by
query parameter of the List all records endpoint.
Whether it's a shared filter or not
Model associated with the filter
import { buildClient } from '@datocms/cma-client-node';async function run() {const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });const itemTypeFilter = await client.itemTypeFilters.create({name: 'Draft posts',item_type: {type: 'item_type',id: 'DxMaW10UQiCmZcuuA-IkkA'}});console.log(itemTypeFilter);}run();