Custom types
custom_types.json are a JSON-only feature and cannot be configured via the SquaredUp application. They must be created and edited directly in a plugin folder.
Custom types define how your plugin's indexed objects are represented throughout SquaredUp. They provide the display metadata for an object type, including its name, icon, and singular/plural labels.
When users browse indexed objects, scope dashboards, or select objects in pickers, SquaredUp uses the custom type definition to determine how those objects are displayed.
Adding a custom type
Create a custom_types.json file in the root of your plugin folder.
The file must contain an array of type definitions, with one object for each indexed object type exposed by your plugin.
Example
[
{
"name": "My Plugin Device",
"sourceType": "my-plugin-device",
"icon": "server",
"singular": "Device",
"plural": "Devices"
}
]Properties
Relationship to object indexing
Custom types are linked to indexed objects through the sourceType value.
The sourceType defined in custom_types.json must exactly match the type assigned during indexing. If the values do not match, SquaredUp will be unable to apply the custom display settings to the indexed objects.
// custom_types.json
{ "sourceType": "my-plugin-device", ... }Choosing icons
Custom types use icons from the Lucide icon library.
Browse lucide.dev/icons tto find an appropriate icon and use its name in lowercase kebab-case format.
For example:
Multiple types
A single plugin can define multiple object types by adding additional entries to the array.
This is useful when your plugin indexes different categories of objects, such as servers, databases, users, or network devices.
[
{ "name": "My Plugin Server", "sourceType": "myPlugin-server", "icon": "server", "singular": "Server", "plural": "Servers" },
{ "name": "My Plugin Database", "sourceType": "myPlugin-database", "icon": "database", "singular": "Database", "plural": "Databases" }
]Examples
- UniFi custom_types.json:
Defines separate object types for network devices, clients, and sites, each with their own icon and display labels. - FantasyPremierLeague custom_types.json:
Defines custom types for Fantasy Premier League entities such as teams and players, allowing them to be scoped and displayed consistently throughout SquaredUp.