Templates

interface Templates

Template management: /template and /templates.

Functions

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun categories(): List<String>

GET /templates/categories.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun delete(id: TemplateId)

DELETE /template/{id}.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun download(id: TemplateId): TemplateFile

GET /template/{id}.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun list(query: ListTemplatesQuery = ListTemplatesQuery()): Page<TemplateInfo>

GET /templates, one page.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract fun listAll(query: ListTemplatesQuery = ListTemplatesQuery()): Flow<TemplateInfo>

Every template, following nextCursor. Errors are raised on the collecting Raise.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun tags(): List<String>

GET /templates/tags.

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun update(id: TemplateId, patch: TemplatePatch): TemplateInfo

PATCH /template/{id}. Requires template management (cloud / enterprise).

Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun upload(source: TemplateSource.Content, options: UploadOptions = UploadOptions()): UploadedTemplate

POST /template. Multipart upload, metadata fields before the file.