Reference
@tentocms/client
Official TypeScript SDK for TentoCMS
@tentocms/client
Official TypeScript SDK for TentoCMS
Classes
| Class | Description |
|---|---|
| BlogCategoriesResource | Blog categories sub-resource |
| BlogPostsResource | Blog posts sub-resource |
| BlogResource | Blog resource for interacting with the TentoCMS Blog API |
| BlogTagsResource | Blog tags sub-resource |
| CollectionsResource | Collections resource for interacting with the TentoCMS Collections API |
| CollectionsWriteResource | Collections write resource for creating, updating, and managing collection items Requires a secret API key (tento_sk_*) |
| MediaResource | Media resource for interacting with the TentoCMS Media API |
| MediaWriteResource | Media write resource for uploading files Requires a secret API key (tento_sk_*) |
| PagesResource | Pages resource for interacting with the TentoCMS Pages API |
| PagesWriteResource | Pages write resource for creating, updating, and managing pages Requires a secret API key (tento_sk_*) |
| TentoAuthenticationError | Error thrown when authentication fails (HTTP 401) Usually indicates an invalid or missing API key |
| TentoClient | TentoCMS TypeScript SDK Client |
| TentoError | Base error class for all TentoCMS SDK errors |
| TentoNetworkError | Error thrown when a network error occurs (timeout, connection refused, etc.) |
| TentoNotFoundError | Error thrown when a resource is not found (HTTP 404) |
| TentoRateLimitError | Error thrown when rate limit is exceeded (HTTP 429) |
Interfaces
| Interface | Description |
|---|---|
| BlogAuthor | Blog author reference |
| BlogCategory | Blog category |
| BlogPost | Blog post from the public API |
| BlogPostListOptions | Options for listing blog posts |
| BlogTag | Blog tag |
| CollectionItemResponse | Response from fetching a single collection item, includes collection type metadata |
| CollectionListOptions | Options for listing collection items |
| CollectionListResponse | Response from listing collection items, includes collection type metadata. |
| CollectionTypeMeta | Collection type metadata returned alongside collection data |
| CreateCollectionItemInput | Input for creating a collection item via the public API |
| CreatePageInput | Input for creating a page via the public API |
| DryRunResult | Dry-run validation result |
| FilterCondition | Filter condition for querying |
| ItemResponse | Single item response |
| ListResponse | Paginated list response |
| Media | Complete media object with all metadata |
| MediaItem | Full media item returned by GET /media/:id. Contains complete metadata including id, size, and timestamps. |
| MediaOption | Allows requesting the lighter URL-only media serialization on individual reads. media: 'url' sends ?media=url; omitted/'object' keeps the default full-object shape. |
| MediaTransformOptions | Options for media image transformations |
| Page | Page object from the public API |
| PageGetOptions | Options for fetching a single page by slug |
| PageListOptions | Options for listing pages |
| PageWithRedirect | Result of pages.getBySlug(slug, { includeRedirect: true }). |
| PaginationMeta | Pagination metadata |
| PreviewOption | Per-request preview mode toggle. |
| RedirectInfo | Slug-change redirect info, returned alongside a page fetched by an old slug. |
| RefTypesOption | Controls 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. |
| SeoMetadata | SEO metadata for pages and posts |
| TentoClientConfig | Configuration options for TentoClient |
| TentoMedia | Media 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. |
| UpdateCollectionItemInput | Input for updating a collection item via the public API |
| UpdatePageInput | Input for updating a page via the public API |
| UploadMediaInput | Input for uploading media via the public API |
| WriteCollectionItem | Write collection item response |
| WritePage | Write page response (includes more fields than read Page) |
Type Aliases
| Type Alias | Description |
|---|---|
| BlogPostListItem | A blog post as returned by the list endpoint. |
| BlogPostListResponse | Response from listing blog posts (blog-specific convenience type) |
| CollectionItem | Collection item from the public API |
| FilterOperator | Filter operators for querying |
| MediaMode | Media 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). |

