Response Shapes
TypeScript type definitions for all current API responses
This page provides TypeScript reference types for the currently shipped Vine public API.
Shared Types
ErrorResponse
All error responses follow this format:
type ErrorResponse = {
ok: false;
error: string;
};Posts
PostSummary
Used in post lists and includes basic post information.
type PostSummary = {
id: string;
title: string;
slug: string;
excerpt: string;
readingTimeMinutes: number;
publishedAt: string | null;
updatedAt: string;
author: { id: string; name: string } | null;
category: { slug: string; name: string } | null;
tags: Array<{ slug: string; name: string }>;
};PostDetail
Used when fetching a single post. Includes all fields from PostSummary plus the full HTML content.
type PostDetail = PostSummary & { contentHtml: string };PostListResponse
Response shape for post list endpoints.
type PostListResponse = {
ok: true;
posts: PostSummary[];
};PostDetailResponse
Response shape for post detail (single post) endpoints.
type PostDetailResponse = {
ok: true;
post: PostDetail;
};Tags And Categories
Category
type Category = {
id: string;
name: string;
slug: string;
};Tag
type Tag = {
id: string;
name: string;
slug: string;
};CategoryListResponse
type CategoryListResponse = {
ok: true;
categories: Category[];
};TagListResponse
type TagListResponse = {
ok: true;
tags: Tag[];
};Authors
Author
type Author = {
id: string;
name: string;
email: string;
about: string;
socialLinks: Record<string, string>;
};AuthorListResponse
Response shape for authors endpoint.
type AuthorListResponse = {
ok: true;
authors: Author[];
};Workspace Stats
Stats
type Stats = {
totalPosts: number;
totalAuthors: number;
totalCategories: number;
totalTags: number;
};StatsResponse
type StatsResponse = {
ok: true;
stats: Stats;
};Operational Checks
HealthResponse
type HealthResponse = {
ok: true;
service: 'web';
runtime: 'nextjs+elysia';
};StatusResponse
type StatusResponse = {
ok: true;
message: string;
};Notes
readingTimeMinutesis estimated from text, images, and code blocks- route-level failures use
error, notmessage - the current API does not ship pagination or filtering response metadata