SDK scopes
Scopes define which SDK operations your app is allowed to call.
config.scopes is mandatory in manifest.json.
Declare scopes in manifest.json under config.scopes.
This is a partial snippet showing only the relevant part (not a full manifest):
{
"config": {
"scopes": ["design:state:read", "design:state:write"]
}
}
For a complete manifest.json example, see App manifest.
Supported scopes
These are the currently supported scopes:
design:state:read: read design and editor state via SDK APIs.design:state:write: update design state (for example add, remove, and update objects).uploads:create: upload files withkittl.upload.image.upload({ blob }); apps can then use their own uploaded files.uploads:global:read: allows an app to read all uploads available in the current workspace (not limited to the current user's uploads).ai:credit:spend: spend AI credits viakittl.ai.spendCredits.fonts:read: read fonts created by the extension.fonts:write: create or modify fonts created by the extension viakittl.data.fonts.fonts:read:global: read all custom fonts available to the user.fonts:write:global: modify all custom fonts available to the user.data:mockups:read: browse and search the mockup catalog viakittl.data.mockups.workspace:state:read: reserved for workspace state reads.workspace:state:write: reserved for workspace state writes.
Scope to SDK API mapping
The table below shows the exact scope required for each SDK method. Methods not listed here (e.g. kittl.context.get) are exempt and always allowed.
design:state:read
| Method | Description |
|---|---|
kittl.design.canvas.getPreviewImage | Get a board preview image |
kittl.design.canvas.getScreenshot | Capture canvas screenshot |
kittl.design.canvas.getExport | Export to blob |
kittl.design.object.getObject | Get object by ID |
kittl.design.object.getAllByFilter | Query objects by predicate |
kittl.state.viewport.get | Get viewport state |
kittl.state.viewport.set | see design:state:write |
kittl.state.getSelectedObjectsIds | Get selected object IDs |
kittl.state.getSelectedLayersIds | Get selected layer IDs |
kittl.state.getSelectedArtboardIds | Get selected artboard IDs |
kittl.state.getCanvasMode | Get canvas mode |
kittl.state.getActiveTool | Get active tool |
kittl.state.getHighlightedObjectId | Get highlighted object ID |