Data API Reference
kittl.data — access Kittl catalog data and manage custom fonts.
Scopes
| Scope | Required for |
|---|---|
data:mockups:read | All kittl.data.mockups.* methods |
fonts:read | Reading fonts created by the extension |
fonts:read:global | Reading all custom fonts available to the user; required for listUserFonts |
fonts:write | Creating or modifying fonts created by the extension |
fonts:write:global | Modifying all custom fonts available to the user |
Mockups
kittl.data.mockups — browse and search the mockup catalog.
Scope: data:mockups:read
get(id)
Fetch a single mockup by numeric ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
id | number | Yes | Mockup ID |
Returns: SdkResultAsync<CatalogItem>
getOverview(options?)
Fetch a high-level overview of mockup groups (categories).
| Parameter | Type | Required | Description |
|---|---|---|---|
options.sort | string | No | Sort order |
Returns: SdkResultAsync<MockupOverviewDto>
getGroup(groupId, options?)
Fetch mockups within a specific group.
| Parameter | Type | Required | Description |
|---|---|---|---|
groupId | string | Yes | Group ID |
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<MockupGroupDto>
search(query, options?)
Search mockups by text query.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query |
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<PaginatedResult<CatalogItem>>
getSuggestions()
Get suggested search tags and groups for the mockup catalog.
Returns: SdkResultAsync<MockupSuggestions>
Fonts
kittl.data.fonts — manage custom fonts uploaded by the user or extension.
Font scope behavior
fonts:read and fonts:write apply to fonts created by the extension.
fonts:read:global and fonts:write:global apply to all custom fonts available to the user.
listUserFonts(options?)
List fonts uploaded by the current user.
Scope: fonts:read:global
| Parameter | Type | Required | Description |
|---|---|---|---|
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<FontListDto>
listExtensionFonts(options?)
List fonts uploaded by the current extension.
Scope: fonts:read or fonts:read:global
| Parameter | Type | Required | Description |
|---|---|---|---|
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<FontListDto>
get(fontFamilyId)
Fetch a single font family by ID.
Scope: fonts:read or fonts:read:global
| Parameter | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
Returns: SdkResultAsync<FontFamilyDto>
find(ids)
Fetch multiple font families by their IDs.
Scope: fonts:read or fonts:read:global
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Array of font family IDs |
Returns: SdkResultAsync<FontFamilyDto[]>
create(options)
Create a new font family with one or more styles.
Scope: fonts:write
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Font family name |
files | Blob[] | Yes | Font file blobs (one per style) |
styles | string[] | Yes | Style names matching files in order (e.g. ['Regular', 'Bold']) |
previewImage | Blob | No | Preview image blob for the font family |
Returns: SdkResultAsync<FontFamilyDto>
update(options)
Rename a font family.
Scope: fonts:write or fonts:write:global
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Font family ID |
name | string | Yes | New name |
Returns: SdkResultAsync<FontFamilyDto>
delete(ids)
Soft-delete font families so they cannot be used on new font elements.
Scope: fonts:write or fonts:write:global
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Font family IDs to delete |
Returns: SdkResultAsync<void>
destroy(ids)
Hard-delete font families and remove them from all font elements across all designs in the workspace.
Scope: fonts:write or fonts:write:global
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Font family IDs to destroy |
Returns: SdkResultAsync<void>
addStyle(options)
Add new styles to an existing font family.
Scope: fonts:write or fonts:write:global
| Property | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
files | Blob[] | Yes | Font files to upload as new styles |
styles | string[] | Yes | Style names matching files in order |
Returns: SdkResultAsync<FontFamilyDto>
updateStyle(options)
Update a style's name within a font family.
Scope: fonts:write or fonts:write:global
| Property | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
id | string | Yes | Style ID to update |
style | string | Yes | New style name |
Returns: SdkResultAsync<void>
deleteStyle(options)
Delete a style from a font family.
Scope: fonts:write or fonts:write:global
| Property | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
id | string | Yes | Style ID to delete |
Returns: SdkResultAsync<void>
Types
CatalogItem
| Property | Type | Description |
|---|---|---|
id | string | Unique item ID |
name | string | Display name |
previewImages | string[] | Preview image URLs |
PaginationOptions
| Property | Type | Description |
|---|---|---|
take | number? | Number of items to fetch |
skip | number? | Number of items to skip |
sort | string? | Sort order |
cursor | string? | Cursor for keyset pagination |
PaginatedResult<T>
| Property | Type | Description |
|---|---|---|
items | T[] | Page of results |
total | number? | Total count (when available) |
hasMore | boolean | Whether more pages exist |
FontFamilyDto
Extends CatalogItem.
| Property | Type | Description |
|---|---|---|
styles | FontStyleDto[] | Styles in this family |
extension | { id: string; name?: string } | null | Extension that uploaded the font, or null |
FontStyleDto
| Property | Type | Description |
|---|---|---|
id | string | Style ID |
name | string | Style name |
style | string | null | Style descriptor (e.g. "Regular", "Bold") |
FontListDto
type FontListDto = PaginatedResult<FontFamilyDto>;
MockupOverviewDto
| Property | Type | Description |
|---|---|---|
overview | MockupOverviewGroupDto[] | Array of group summaries |
MockupOverviewGroupDto
| Property | Type | Description |
|---|---|---|
id | string | Group ID |
name | string | Group name |
mockups | CatalogItem[] | Preview items in this group |
total | number | Total mockups in group |
MockupGroupDto
| Property | Type | Description |
|---|---|---|
group | { id: string; name: string } | Group metadata |
data | PaginatedResult<CatalogItem> | Paginated mockups |
MockupSuggestions
| Property | Type | Description |
|---|---|---|
tags | string[] | Suggested search tags |
groups | string[] | Suggested group IDs |