Data API Reference
kittl.data — access Kittl catalog data and manage custom fonts. The mockup catalog and kittl.data.fonts management API were added in SDK 0.0.5. The separate font upload API has been available since 0.0.1.
Mockups
kittl.data.mockups — browse and search the mockup catalog.
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.
listUserFonts(options?)
List fonts uploaded by the current user.
| Parameter | Type | Required | Description |
|---|---|---|---|
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<FontListDto>
listExtensionFonts(options?)
List fonts uploaded by the current extension.
| Parameter | Type | Required | Description |
|---|---|---|---|
options | PaginationOptions | No | Pagination parameters |
Returns: SdkResultAsync<FontListDto>
get(fontFamilyId)
Fetch a single font family by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
Returns: SdkResultAsync<FontFamilyDto>
find(ids)
Fetch multiple font families by their IDs.
| 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.
| 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.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Font family ID |
name | string | Yes | New name |
Returns: SdkResultAsync<FontFamilyDto>
delete(ids)
Soft-delete font families (can be restored).
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Font family IDs to delete |
Returns: SdkResultAsync<void>
destroy(ids)
Permanently destroy font families (cannot be undone).
| 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.
| Property | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
objectIds | string[] | Yes | Object IDs for the style files |
styles | string[] | Yes | Style names matching objectIds in order |
Returns: SdkResultAsync<FontFamilyDto>
deleteStyle(options)
Remove a single style from a font family.
| Property | Type | Required | Description |
|---|---|---|---|
fontFamilyId | string | Yes | Font family ID |
id | string | Yes | Style ID to delete |
Returns: SdkResultAsync<void>
updateStyle(options)
Update a style's name within a font family.
| 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>
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 |