TentoCMS
Reference

@tentocms/client

Official TypeScript SDK for TentoCMS

@tentocms/client

Official TypeScript SDK for TentoCMS

Classes

ClassDescription
BlogCategoriesResourceBlog categories sub-resource
BlogPostsResourceBlog posts sub-resource
BlogResourceBlog resource for interacting with the TentoCMS Blog API
BlogTagsResourceBlog tags sub-resource
CollectionsResourceCollections resource for interacting with the TentoCMS Collections API
CollectionsWriteResourceCollections write resource for creating, updating, and managing collection items Requires a secret API key (tento_sk_*)
MediaResourceMedia resource for interacting with the TentoCMS Media API
MediaWriteResourceMedia write resource for uploading files Requires a secret API key (tento_sk_*)
PagesResourcePages resource for interacting with the TentoCMS Pages API
PagesWriteResourcePages write resource for creating, updating, and managing pages Requires a secret API key (tento_sk_*)
TentoAuthenticationErrorError thrown when authentication fails (HTTP 401) Usually indicates an invalid or missing API key
TentoClientTentoCMS TypeScript SDK Client
TentoErrorBase error class for all TentoCMS SDK errors
TentoNetworkErrorError thrown when a network error occurs (timeout, connection refused, etc.)
TentoNotFoundErrorError thrown when a resource is not found (HTTP 404)
TentoRateLimitErrorError thrown when rate limit is exceeded (HTTP 429)

Interfaces

InterfaceDescription
BlogAuthorBlog author reference
BlogCategoryBlog category
BlogPostBlog post from the public API
BlogPostListOptionsOptions for listing blog posts
BlogTagBlog tag
CollectionItemResponseResponse from fetching a single collection item, includes collection type metadata
CollectionListOptionsOptions for listing collection items
CollectionListResponseResponse from listing collection items, includes collection type metadata.
CollectionTypeMetaCollection type metadata returned alongside collection data
CreateCollectionItemInputInput for creating a collection item via the public API
CreatePageInputInput for creating a page via the public API
DryRunResultDry-run validation result
FilterConditionFilter condition for querying
ItemResponseSingle item response
ListResponsePaginated list response
MediaComplete media object with all metadata
MediaItemFull media item returned by GET /media/:id. Contains complete metadata including id, size, and timestamps.
MediaOptionAllows requesting the lighter URL-only media serialization on individual reads. media: 'url' sends ?media=url; omitted/'object' keeps the default full-object shape.
MediaTransformOptionsOptions for media image transformations
PagePage object from the public API
PageGetOptionsOptions for fetching a single page by slug
PageListOptionsOptions for listing pages
PageWithRedirectResult of pages.getBySlug(slug, { includeRedirect: true }).
PaginationMetaPagination metadata
PreviewOptionPer-request preview mode toggle.
RedirectInfoSlug-change redirect info, returned alongside a page fetched by an old slug.
RefTypesOptionControls whether resolved collection-item references carry their _type discriminator (the collection-type slug). refTypes: false sends ?refTypes=false to drop it — a smaller payload for consumers that already know each reference's type from context. Omitted/true keeps the default (included) shape.
SeoMetadataSEO metadata for pages and posts
TentoClientConfigConfiguration options for TentoClient
TentoMediaMedia reference embedded in page/blog content fields. Uses underscore-prefixed keys to distinguish system fields from user content. Returned by the public API when a media field is resolved in page content or as featuredImage on blog posts.
UpdateCollectionItemInputInput for updating a collection item via the public API
UpdatePageInputInput for updating a page via the public API
UploadMediaInputInput for uploading media via the public API
WriteCollectionItemWrite collection item response
WritePageWrite page response (includes more fields than read Page)

Type Aliases

Type AliasDescription
BlogPostListItemA blog post as returned by the list endpoint.
BlogPostListResponseResponse from listing blog posts (blog-specific convenience type)
CollectionItemCollection item from the public API
FilterOperatorFilter operators for querying
MediaModeMedia serialization mode for public reads. - object (default): media references resolve to the full object ({ _url, _mimeType, _width, _height, _altText }). - url: media references resolve to just the URL string — a lighter payload for consumers that only need <img src> (drops dimensions/alt used for CLS/srcset/a11y).

Functions

FunctionDescription
getUrlExtract the URL from a TentoMedia object. Returns undefined if media is null or undefined.
mockMediaCreate a mock TentoMedia object for testing
Copyright © 2026