interface BuildWispClient { baseUrl?: string; blogId: string; } export interface Author { name: string | null; image: string | null; } export interface TagInPost { id: string; name: string; } export interface PostPagination { page: number; limit: number | "all"; totalPages: number; totalPosts: number; nextPage: number | null; prevPage: number | null; } export interface GetPostsResult { posts: { id: string; createdAt: Date; teamId: string; description: string | null; title: string; slug: string; image: string | null; authorId: string; updatedAt: Date; publishedAt: Date | null; author: Author; tags: TagInPost[]; }[]; pagination: PostPagination; } export interface GetRelatedPostsResult { posts: { id: string; createdAt: Date; teamId: string; description: string | null; title: string; slug: string; image: string | null; authorId: string; updatedAt: Date; publishedAt: Date | null; distance: number; }[]; } export interface GetPostResult> { post: { id: string; createdAt: Date; teamId: string; description: string | null; title: string; content: string; slug: string; image: string | null; metadata: MetadataType | null; authorId: string; updatedAt: Date; publishedAt: Date | null; tags: TagInPost[]; author: Author; } | null; } export interface TagPagination { page: number; limit: number | "all"; totalPages: number; totalTags: number; nextPage: number | null; prevPage: number | null; } export interface GetTagsResult { tags: { id: string; name: string; description: string | null; }[]; pagination: TagPagination; } export interface GetCtasResult { ctas: { id: string; title: string; description: string | null; slug: string; teamId: string; createdAt: Date; updatedAt: Date; distance: number; }[]; } export interface ContentPagination { page: number; limit: number | "all"; totalPages: number; totalContents: number; nextPage: number | null; prevPage: number | null; } export type FieldType = "text" | "textarea" | "rich_text" | "boolean" | "number" | "date" | "image" | "select" | "multi_select"; export interface BaseField { label: string; name: string; type: Exclude; required?: boolean; description?: string; } export interface SelectField extends Omit { type: "select"; options: string[]; } export interface MultiSelectField extends Omit { type: "multi_select"; options: string[]; } export type Field = BaseField | SelectField | MultiSelectField; export interface VersionedField { version: string; fields: Field[]; } export interface ContentTypeMetadata { name: string; slug: string; schema: VersionedField; } export interface Content> { id: string; slug: string; publishedAt: Date | null; createdAt: Date; updatedAt: Date; content: ContentType; author: Author; } export interface GetContentsResult> { contents: Content[]; contentType: ContentTypeMetadata; pagination: ContentPagination; } export interface GetContentResult> { content: Content; contentType: ContentTypeMetadata; } export interface CommentPagination { page: number; limit: number | "all"; totalPages: number; totalComments: number; nextPage: number | null; prevPage: number | null; } export interface CommentConfig { enabled: boolean; allowUrls: boolean; allowNested: boolean; reviewType: "AUTO_APPROVE" | "MANUAL_REVIEW" | "AI_REVIEW"; signUpMessage: string | null; } export interface Comment { id: string; author: string; content: string; createdAt: Date; url?: string | null; parent?: { id: string; author: string; content: string; url?: string | null; createdAt: Date; } | null; } export interface GetCommentsResult { comments: Comment[]; pagination: CommentPagination; config: CommentConfig; } export interface CreateCommentInput { slug: string; author: string; email: string; url?: string; content: string; allowEmailUsage: boolean; parentId?: string; } export interface CreateCommentResult { success: boolean; } export declare const buildWispClient: ({ baseUrl, blogId, }: BuildWispClient) => { getPosts: ({ page, limit, tags, query, }?: { page?: number | undefined; limit?: number | "all" | undefined; tags?: string[] | undefined; query?: string | undefined; }) => Promise; getPost: >(slug: string) => Promise>; getRelatedPosts: ({ slug, limit, }: { slug: string; limit?: number | undefined; }) => Promise; getCtas: ({ slug, limit }: { slug: string; limit?: number | undefined; }) => Promise; getTags: (page?: number, limit?: number | "all") => Promise; getContents: >({ contentTypeSlug, page, limit, }: { contentTypeSlug: string; page?: number | undefined; limit?: number | "all" | undefined; }) => Promise>; getContent: >({ contentTypeSlug, contentSlug, }: { contentTypeSlug: string; contentSlug: string; }) => Promise>; getComments: ({ slug, page, limit, }: { slug: string; page?: number | undefined; limit?: number | "all" | undefined; }) => Promise; createComment: (input: CreateCommentInput) => Promise; }; export {};