App Manifest Guide
A JSON definition file that defines data for Square to run Add-ons in the Seller Dashboard.
The app manifest is a JSON file that describes essential information about the Dashboard Add-on.
In your application’s file structure, the app manifest provides key data for Square to load and run an Add-on. For the Developer Preview release, the app manifest provides metadata for the following properties:
- Placements: The list of supported placements where they want their Add-on to be exposed.
- Metadata: Any additional metadata (such as Add-on name) that is needed to render UI.
- Identifiers: Data such as the Add-on ID that may be needed for Square to associate the Add-on with its parent applications.
App manifest code example
{
"add_on_id": "sq6ad63996-6cb4-44d4-b8b8-04115a2fdd58",
"version": "1.0.0",
"views": [
{
"placement": "square.dashboard.customer.view",
"entry_point": "src/views/customer-view.tsx"
},
{
"placement": "square.dashboard.modal",
"entry_point": "src/views/modal.tsx"
},
{
"placement": "square.dashboard.blade",
"entry_point": "src/views/blade.tsx"
}
{
"placement": "square.dashboard.home.widgets",
"entry_point": "src/views/home-widgets.tsx"
},
{
"placement": "square.dashboard.item.view",
"entry_point": "src/views/item-view.tsx"
}
],
"content_security_policy": {
"connect-src": [
"https://api.example.com/a_specific_endpoint",
"https://api.example.com/a_whole_subdirectory"
],
"img-src": ["https://example.com/images/"]
}
}
Properties
Property | Description |
---|---|
add_on_id | The id of the Add-on. The id is set by Square when you upload a package. For local development, this id is ignored, and set as PLACEHOLDER_DO_NOT_MODIFY by the CLI. |
version | The version of the Add-on. Update the version for each iteration of the app manifest. |
views | This field represents each placement of the Add-on and entry_point of the component’s TypeScript source. |
content_security_policy | The content security policy configuration, which uses the connect-src directive for URL restrictions, and img-src to load valid sources for images. See Content security policy for more details. |